What kind of query optimization can Postgresql perform by gathering statistics?
My und开发者_Go百科erstanding is that mysql doesn't use any heuristics when doing query planning and postgresql does.
I'm wondering where I can learn about specifically what kinds of queries can be made more efficient given the collected statistics.
For example, I know that postgresql has merge and bitmap indexes, so based on historical data on the number of rows it expects to return it might choose to use indexes in these ways.
The manual has some chapters about this issue:
- Genetic Query Optimizer
- How the Planner Uses Statistics
精彩评论