1
1
.\" This is -*-nroff-*-
2
2
.\" 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 $
4
4
.TH EXPLAIN SQL 06/12/97 PostgreSQL PostgreSQL
5
5
.SH NAME
6
6
explain - explains statement execution details
@@ -10,21 +10,22 @@ explain - explains statement execution details
10
10
.fi
11
11
.SH DESCRIPTION
12
12
This command outputs details about the supplied query. The default
13
- output is the computed query cost. \f2 verbose \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. \f2 verbose \f1 displays
15
+ the full query plan and cost to your screen, and pretty-prints the plan
16
+ to the postmaster log file.
16
17
17
18
.SH EXAMPLES
18
19
In the examples, the table has a single column of float4.
19
20
\fB cost \fR is the cost of scanning a base/join relation,
20
- \fB size \fR is the expected number of tuples from a scan,
21
+ \fB rows \fR is the expected number of rows from a scan,
21
22
\fB width \fR is the length of a tuple.
22
23
23
24
.nf
24
25
tgl=> explain select a from test\g
25
26
NOTICE:QUERY PLAN:
26
27
27
- Seq Scan on test (cost=0.00 size =0 width=4)
28
+ Seq Scan on test (cost=0.00 rows =0 width=4)
28
29
29
30
EXPLAIN
30
31
tgl=> explain verbose select sum(a) from test;
@@ -41,8 +42,8 @@ NOTICE:QUERY PLAN:
41
42
:expr {VAR :varno 1 :varattno 1 :vartype 700 :varnoold 1 :varoattno 1}})
42
43
:qpqual <> :lefttree <> :righttree <> :scanrelid 1} :righttree <> :numagg 1 }
43
44
44
- Aggregate (cost=0.00 size =0 width=0)
45
- -> Seq Scan on test (cost=0.00 size =0 width=4)
45
+ Aggregate (cost=0.00 rows =0 width=0)
46
+ -> Seq Scan on test (cost=0.00 rows =0 width=4)
46
47
.fi
47
48
48
49
The Postgres optimizer has chosen to use a sequential scan to retrieve rows from
0 commit comments