Performance Tuning

Analyzing Postgres Tables

What happens when you run analyze in postgres?

Valerie Parham-Thompson
In my previous blog post, I used analyze after defining extended statistics. But why do we run this statement?

Extended Statistics in Postgres

Using extended statistics helps improve performance for queries in postgres.

Valerie Parham-Thompson
Something you probably already know about Postgres: The planner needs to know things about the data to come up with a good access plan. For example, it needs to decide whether to use an index or a sequential scan. It’s looking at things like row count or distinct values when it comes up with this plan.