Use on-disk size to order the source tables.
The estimated row counts found in pg_catalog.pg_class.reltuples is only meaningful when ANALYZE was run recently enough, or at all, otherwise all the tables are reporting zero there. Instead, let's use pg_table_size() result. It's not that expensive to get.
parent
0a8fbbad
Please register or sign in to comment