\connect mydatabase analyze verbose myschema.mytable;Documentation here
Minimalistic Oracle contains a collection of practical examples from my encounters with Oracle technologies. When relevant, I also write about other technologies, like Linux or PostgreSQL. Many of the posts starts with "how to" since they derive directly from my own personal experience. My goal is to provide simple examples, so that they can be easily adapted to other situations.
Wednesday, September 8, 2021
How to analyze a table in PostgreSQL
Just like Oracle, PostgreSQL stores statistics about the tables in an internal table called pg_statistics. This is used by the query planner to determine the most efficient execution path.
To gather fresh statistics on a table, use the following simple syntax:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment