1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

EXPLAIN ANALYZE feature to measure and show actual runtimes and tuple

counts alongside the planner's estimates.  By Martijn van Oosterhout,
with some further work by Tom Lane.
This commit is contained in:
Tom Lane
2001-09-18 01:59:07 +00:00
parent 27d2890b87
commit 89fa551808
18 changed files with 413 additions and 87 deletions

View File

@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.250 2001/09/06 04:57:28 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.251 2001/09/18 01:59:06 tgl Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -3168,6 +3168,7 @@ opt_name_list: '(' name_list ')' { $$ = $2; }
*
* QUERY:
* EXPLAIN query
* EXPLAIN ANALYZE query
*
*****************************************************************************/
@@ -3175,9 +3176,18 @@ ExplainStmt: EXPLAIN opt_verbose OptimizableStmt
{
ExplainStmt *n = makeNode(ExplainStmt);
n->verbose = $2;
n->analyze = FALSE;
n->query = (Query*)$3;
$$ = (Node *)n;
}
| EXPLAIN analyze_keyword opt_verbose OptimizableStmt
{
ExplainStmt *n = makeNode(ExplainStmt);
n->verbose = $3;
n->analyze = TRUE;
n->query = (Query*)$4;
$$ = (Node *)n;
}
;