![]() Run time of the entire statement is always measured, even when node-level timing is turned off with this option. The overhead of repeatedly reading the system clock can slow down the query significantly on some systems, so it may be useful to set this parameter to FALSE when only actual row counts, and not exact times, are needed. Include actual startup time and time spent in each node in the output. This parameter may only be used when ANALYZE is also enabled. ![]() In text format, only non-zero values are printed. ![]() Specifically, include the number of records, number of full page images (fpi) and the amount of WAL generated in bytes. Include information on WAL record generation. The number of blocks shown for an upper-level node includes those used by all its child nodes. The number of blocks dirtied indicates the number of previously unmodified blocks that were changed by this query while the number of blocks written indicates the number of previously-dirtied blocks evicted from cache by this backend during query processing. Shared blocks contain data from regular tables and indexes local blocks contain data from temporary tables and indexes while temporary blocks contain short-term working data used in sorts, hashes, Materialize plan nodes, and similar cases. A hit means that a read was avoided because the block was found already in cache when needed. Specifically, include the number of shared blocks hit, read, dirtied, and written, the number of local blocks hit, read, dirtied, and written, the number of temp blocks read and written, and the time spent reading and writing data file blocks and temporary file blocks (in milliseconds) if track_io_timing is enabled. Specifically, include options affecting query planning with value different from the built-in default value. Include information on configuration parameters. Include information on the estimated startup and total cost of each plan node, as well as the estimated number of rows and the estimated width of each row. 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. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |