Analyzing Postgres Tables

In my previous blog post, I used analyze after defining extended statistics . But why do we run this statement? When you run analyze on a postgres table, the pg_statistic table (and therefore the pg_stats view) gets updated. Those statistics give insight into the size and shape of the data in the tables so the query planner can choose an optimal lookup path. It is executed in the background during…