Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfc08814

Browse files
committed
Rename explain's "size" to "rows".
1 parent35b1686 commitfc08814

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

‎doc/src/sgml/ref/explain.sgml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ Description
102102
<PARA>
103103
This command outputs details about the supplied query.
104104
The default output is the computed query cost.
105+
The cost value is only meaningful to the optimizer in comparing
106+
various query plans.
105107
VERBOSE displays the full query plan and cost to your screen,
106108
and pretty-prints the plan to the postmaster log file.
107109
</para>
@@ -135,7 +137,7 @@ To show a query plan for a simple query:
135137
postgres=> explain select * from foo;
136138
NOTICE: QUERY PLAN:
137139

138-
Seq Scan on foo (cost=0.00size=0 width=4)
140+
Seq Scan on foo (cost=0.00rows=0 width=4)
139141

140142
EXPLAIN
141143
</ProgramListing>

‎src/backend/commands/explain.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Copyright (c) 1994-5, Regents of the University of California
66
*
7-
* $Id: explain.c,v 1.33 1999/03/2316:50:46 momjian Exp $
7+
* $Id: explain.c,v 1.34 1999/04/2321:23:48 momjian Exp $
88
*
99
*/
1010
#include<stdio.h>
@@ -234,7 +234,7 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
234234
}
235235
if (es->printCost)
236236
{
237-
appendStringInfo(str," (cost=%.2fsize=%d width=%d)",
237+
appendStringInfo(str," (cost=%.2frows=%d width=%d)",
238238
plan->cost,plan->plan_size,plan->plan_width);
239239
}
240240
appendStringInfo(str,"\n");

‎src/man/explain.l

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" This is -*-nroff-*-
22
.\" XXX standard disclaimer belongs here....
3-
.\" $Header: /cvsroot/pgsql/src/man/Attic/explain.l,v 1.10 1998/08/04 15:00:28 momjian Exp $
3+
.\" $Header: /cvsroot/pgsql/src/man/Attic/explain.l,v 1.11 1999/04/23 21:23:49 momjian Exp $
44
.TH EXPLAIN SQL 06/12/97 PostgreSQL PostgreSQL
55
.SH NAME
66
explain - explains statement execution details
@@ -10,21 +10,22 @@ explain - explains statement execution details
1010
.fi
1111
.SH DESCRIPTION
1212
This command outputs details about the supplied query. The default
13-
output is the computed query cost.\f2verbose\f1 displays the full query
14-
plan and cost to your screen, and pretty-prints the plan to the postmaster
15-
log file.
13+
output is the computed query cost. The cost value is only meaningful to
14+
the optimizer in comparing various query plans.\f2verbose\f1 displays
15+
the full query plan and cost to your screen, and pretty-prints the plan
16+
to the postmaster log file.
1617

1718
.SH EXAMPLES
1819
In the examples, the table has a single column of float4.
1920
\fBcost\fR is the cost of scanning a base/join relation,
20-
\fBsize\fR is the expected number oftuples from a scan,
21+
\fBrows\fR is the expected number ofrows from a scan,
2122
\fBwidth\fR is the length of a tuple.
2223

2324
.nf
2425
tgl=> explain select a from test\g
2526
NOTICE:QUERY PLAN:
2627

27-
Seq Scan on test (cost=0.00size=0 width=4)
28+
Seq Scan on test (cost=0.00rows=0 width=4)
2829

2930
EXPLAIN
3031
tgl=> explain verbose select sum(a) from test;
@@ -41,8 +42,8 @@ NOTICE:QUERY PLAN:
4142
:expr {VAR :varno 1 :varattno 1 :vartype 700 :varnoold 1 :varoattno 1}})
4243
:qpqual <> :lefttree <> :righttree <> :scanrelid 1} :righttree <> :numagg 1 }
4344

44-
Aggregate (cost=0.00size=0 width=0)
45-
-> Seq Scan on test (cost=0.00size=0 width=4)
45+
Aggregate (cost=0.00rows=0 width=0)
46+
-> Seq Scan on test (cost=0.00rows=0 width=4)
4647
.fi
4748

4849
The Postgres optimizer has chosen to use a sequential scan to retrieve rows from

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp