'how explain tbl_rows smaller than estimated_visible_rows

by analyzing the SVV_TABLE_INFO table on my cluster, I noticed that for some table the tbl_rows value was smaller than the estimated_visible_rows value ; Sometimes the gap is very large I did some tests, like running an Analyze or a vaccum but it didn't change anything how explain tbl_rows smaller than estimated_visible_rows



Solution 1:[1]

I see a similar issue where tbl_rows is 36,862,261 where as estimated_visible_rows is 229,512,224. Even after vacuum to 100 percent followed by analyze; tbl_rows is 36,862,261 and estimated_visible_rows is 229,512,224. However, it says in https://aws.amazon.com/premiumsupport/knowledge-center/redshift-vacuum-performance/#:~:text=The%20estimated_visible_rows%20is%20the%20number,and%20unsorted%20should%20reach%200. that "After a complete vacuum (delete and sort), the value for tbl_rows and estimated_visible_rows should resemble each other..."

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ggnanaraj