Accuracy of NUM_ROWS with "estimate statistics"
Posted on 2003-02-26
I'm trying to find a quicker way to obtain row counts on very large tables (25+ million rows). Using a "select count(*)" query on these monster tables is just too slow.
One idea that has been proposed is to analyze the table using "estimate statistics" and then to query all_tables for the NUM_ROWS value. My question for you experts out there is: How accurate are the NUM_ROWS values when the ANALYZE command has estimated statistics instead of computing the statistics? What factors contribute to the row counts being close or far off?
Alternatively, if any of you have any better suggestions for obtaining row counts on very large tables, I would love to hear them.