I hereby claim:
- I am souloist on github.
- I am souloist (https://keybase.io/souloist) on keybase.
- I have a public key ASB332VIgKQnhCRSm7vTwIzmXzGlxwJfizbmMB50e8e1WQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
When optimizing query performance; the EXPLAIN
and EXPLAIN ANALYZE
commands are used to display how the postgres query planner decided to run a given query.
The query planner resolves a query by building a tree structure of plan nodes for each step involved in determining the optimal way of fetching data from the database.
EXPLAIN
will not actually run the given query. It will only display the cost estimates that the planner uses for each node.
EXPLAIN ANALYZE
will display the cost estimates as well as actual time in milliseconds for each node.
The query planner's output should be read inside-out, (bottom to top) to determine the order of the query plan.
Sample EXPLAIN ANALYZE
output:
Sort (cost=49150.97..49150.98 rows=2 width=29) (actual time=196.216..196.219 rows=85 loops=1)
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition: