We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

What's in a Plan?

Formale Metadaten

Titel
What's in a Plan?
Untertitel
And how did it get there, anyway?
Serientitel
Anzahl der Teile
37
Autor
Lizenz
CC-Namensnennung 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
Identifikatoren
Herausgeber
Erscheinungsjahr
Sprache

Inhaltliche Metadaten

Fachgebiet
Genre
Abstract
PostgreSQL's EXPLAIN command is a powerful tool, allowing users to expect and understand query plans in detail. However, the output produced by EXPLAIN is not a direct representation of the plan; it omits some information and displays other information in modified form. In this talk, I'll discuss the differences between the plan as displayed by EXPLAIN and what is actually stored in the server's internal data structures. I'll also discuss why the plan includes the information it does, how that information is computed, and how that information is used at execution time. In my 2010 talk "The PostgreSQL Query Planner", I focused primarily on the types of plans that the planner was capable of generating and the reasons why it was necessary to compare various alternatives. Tom Lane's 2011 talk "Hacking the Query Planner" discussed the overall order of operations in the planner and explained some of the motivation behind it. In this talk, I will focus less on the overall operation planner and more on the data structure which it produces as output, namely, a tree of Plan nodes. I hope that this will be helpful in understanding PostgreSQL's execution-time behavior as well as in learning to write patches that touch the planner and executor.