OSDN Git Service

Rename explain's "size" to "rows".
authorBruce Momjian <bruce@momjian.us>
Fri, 23 Apr 1999 21:23:49 +0000 (21:23 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 23 Apr 1999 21:23:49 +0000 (21:23 +0000)
doc/src/sgml/ref/explain.sgml
src/backend/commands/explain.c
src/man/explain.l

index 5f4a806..a1914c7 100644 (file)
@@ -102,6 +102,8 @@ Description
 <PARA>
    This command outputs details about the supplied query.
    The default output is the computed query cost. 
+   The cost value is only meaningful to the optimizer in comparing
+   various query plans.
    VERBOSE displays the full query plan and cost to your screen,
    and pretty-prints the plan to the postmaster log file.   
 </para>
@@ -135,7 +137,7 @@ To 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)
+Seq Scan on foo  (cost=0.00 rows=0 width=4)
 
 EXPLAIN
 </ProgramListing>
index 0983097..6745b4f 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Copyright (c) 1994-5, Regents of the University of California
  *
- *       $Id: explain.c,v 1.33 1999/03/23 16:50:46 momjian Exp $
+ *       $Id: explain.c,v 1.34 1999/04/23 21:23:48 momjian Exp $
  *
  */
 #include <stdio.h>
@@ -234,7 +234,7 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
        }
        if (es->printCost)
        {
-               appendStringInfo(str, "  (cost=%.2f size=%d width=%d)",
+               appendStringInfo(str, "  (cost=%.2f rows=%d width=%d)",
                                plan->cost, plan->plan_size, plan->plan_width);
        }
        appendStringInfo(str, "\n");
index 9bc0925..04c87da 100644 (file)
@@ -1,6 +1,6 @@
 .\" This is -*-nroff-*-
 .\" XXX standard disclaimer belongs here....
-.\" $Header: /cvsroot/pgsql/src/man/Attic/explain.l,v 1.10 1998/08/04 15:00:28 momjian Exp $
+.\" $Header: /cvsroot/pgsql/src/man/Attic/explain.l,v 1.11 1999/04/23 21:23:49 momjian Exp $
 .TH EXPLAIN SQL 06/12/97 PostgreSQL PostgreSQL
 .SH NAME
 explain - explains statement execution details
@@ -10,21 +10,22 @@ explain - explains statement execution details
 .fi
 .SH DESCRIPTION
 This command outputs details about the supplied query.  The default
-output is the computed query cost.  \f2verbose\f1 displays the full query
-plan and cost to your screen, and pretty-prints the plan to the postmaster
-log file.
+output is the computed query cost.  The cost value is only meaningful to
+the optimizer in comparing various query plans. \f2verbose\f1 displays
+the full query plan and cost to your screen, and pretty-prints the plan
+to the postmaster log file.
 
 .SH EXAMPLES
 In the examples, the table has a single column of float4.
 \fBcost\fR is the cost of scanning a base/join relation,
-\fBsize\fR is the expected number of tuples from a scan,
+\fBrows\fR is the expected number of rows from a scan,
 \fBwidth\fR is the length of a tuple.
 
 .nf
 tgl=> explain select a from test\g
 NOTICE:QUERY PLAN:
 
-Seq Scan on test  (cost=0.00 size=0 width=4)
+Seq Scan on test  (cost=0.00 rows=0 width=4)
 
 EXPLAIN
 tgl=> explain verbose select sum(a) from test;
@@ -41,8 +42,8 @@ NOTICE:QUERY PLAN:
   :expr {VAR :varno 1 :varattno 1 :vartype 700 :varnoold 1 :varoattno 1}})
  :qpqual <> :lefttree <> :righttree <> :scanrelid 1} :righttree <> :numagg 1 }
 
-Aggregate  (cost=0.00 size=0 width=0)
-  ->   Seq Scan on test  (cost=0.00 size=0 width=4)
+Aggregate  (cost=0.00 rows=0 width=0)
+  ->   Seq Scan on test  (cost=0.00 rows=0 width=4)
 .fi
 
 The Postgres optimizer has chosen to use a sequential scan to retrieve rows from