5/20/2023 0 Comments Pg json query![]() ![]() The query identifier will also be displayed if one has been computed, see compute_query_id for more details. Specifically, include the output column list for each node in the plan tree, schema-qualify table and function names, always label variables in expressions with their range table alias, and always print the name of each trigger for which statistics are displayed. ![]() VERBOSEĭisplay additional information regarding the plan. This is useful for seeing whether the planner's estimates are close to reality.Ĭarry out the command and show actual run times and other statistics. Then actual run time statistics are added to the display, including the total elapsed time expended within each plan node (in milliseconds) and the total number of rows it actually returned. The ANALYZE option causes the statement to be actually executed, not only planned. Also, if you limit the number of rows to return with a LIMIT clause, the planner makes an appropriate interpolation between the endpoint costs to estimate which plan is really the cheapest. ![]() For most queries the total cost is what matters, but in contexts such as a subquery in EXISTS, the planner will choose the smallest start-up cost instead of the smallest total cost (since the executor will stop after getting one row, anyway). Actually two numbers are shown: the start-up cost before the first row can be returned, and the total cost to return all the rows. The most critical part of the display is the estimated statement execution cost, which is the planner's guess at how long it will take to run the statement (measured in cost units that are arbitrary, but conventionally mean disk page fetches). and if multiple tables are referenced, what join algorithms will be used to bring together the required rows from each input table. The execution plan shows how the table(s) referenced by the statement will be scanned - by plain sequential scan, index scan, etc. This command displays the execution plan that the PostgreSQL planner generates for the supplied statement. ![]()
0 Comments
Leave a Reply. |