Insight into Accuracy/Reliability of Redshift SVV_TABLE_INFO.estimated_visible_rows

0

I am looking at the documentation for SVV_TABLE_INFO and know that the estimated_visible_rows column doesn't include rows marked for deletion (unlike the tbl_rows column, which does include these rows). However, I couldn't find any additional information into the overall accuracy/reliability of the estimated_visible_rows column. Is anything else estimated, besides rows that may/may not be marked for deletion? What is the guaranteed maximum delay in this number being updated (hours, days?).

preguntada hace un año261 visualizaciones
1 Respuesta
1

This is an advanced topic - SVV_TABLE_INFO is a system view so you can check its DDL to find where the column it comes from.

First run show view SVV_TABLE_INFO;. According to the DDL, estimated_visible_rows is defined as following.

(psi.stairows) :: numeric(38, 0) AS estimated_visible_rows,

In the DDL, you can find that psi an alias for pg_statistic_indicator.

The document says:

Stores information about the number of rows inserted or deleted since the last ANALYZE. The PG_STATISTIC_INDICATOR table is updated frequently following DML operations, so statistics are approximate.

To answer your question, this number is approximate and there's no guaranteed maximum delay since ANALYZE happens automatically or triggered by user. Check STL_ANALYZE for ANALYZE operation history.

AWS
Yota_H
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas