EXPLAINPostgreSQL User's GuidePrevNextEXPLAINNameEXPLAIN — Shows statement execution detailsEXPLAIN [ VERBOSE ] query Inputs
VERBOSEFlag to show detailed query plan.
queryAny query.
Outputs
NOTICE: QUERY PLAN:
planExplicit query plan from the Postgres backend.
EXPLAINFlag sent after query plan is shown.
Description This command outputs details about the supplied query.
The default output is the computed query cost.
VERBOSE displays the full query plan and cost to your screen,
and pretty-prints the plan to the postmaster log file.
NotesThere is only sparse documentation on the optimizer's use of cost
information in Postgres.
General information on cost estimation for query optimization
can be found in database textbooks.
Refer to the Programmer's Guide
in the chapters on indexes and the genetic query optimizer for
more information.
UsageTo show a query plan for a simple query:
postgres=> explain select * from foo;
NOTICE: QUERY PLAN:
Seq Scan on foo (cost=0.00 size=0 width=4)
EXPLAIN
CompatibilitySQL92 There is no EXPLAIN statement defined in SQL92.PrevHomeNextDROP VIEWUpFETCH
Wyszukiwarka
Podobne podstrony:
sql framework aug94sqlsqltips portable sqlsql createtableSql iblisting1701 sql28 03 2010 SQLSQL ZADANIAjava sql Datesql 3Podstawy baz danych zajecia 2 z SQL Tabela BibliotekaLaboratorium sql 5sql createviewjava sql TimestampSQL10G pl sqlwięcej podobnych podstron