A few days ago, when starting go work on a new postgresql datawarehouse, I was scared by poor performance and poor exec plans while data volume was not so big…
Here is a quick way to check how your data demographics are, by using the pg_stat_user_tables view.
select relname, last_vacuum, last_autovacuum, last_analyze, last_autoanalyze from pg_stat_user_tables, order by relname
Then, like me, you can ask you dba why some tables do not have up to date data demographics … especially big / frequently queried tables. Note that you have a lot of interesting views / tables to learn more about your data demographics in postgresql :