Bad Row Estimates In PostgreSQL
Intro PostgreSQL is an excellent open-source database. It has an advanced planner that can usually generate good execution plans. But there are cases where it may produce suboptimal results. In order to estimate how many rows a query may return, Postgres relies on different statistics. They are available in the pg_stats view for each column of a table and the pg_class table and are updated when the VACUUM or ANALYZE commands are ran....