From: Ross J. Reedstrom <reedstrm@wallace.ece.rice.edu>
To: Tim Joyce <tim@hoop.co.uk>
Cc: pgsql-general@postgreSQL.org
Subject: Re: [GENERAL] QUERY PLAN:
Date: Wed, 27 Oct 1999 10:09:13 -0500
Message-ID: <19991027100913.A21159@wallace.ece.rice.edu> (raw)
In-Reply-To: <00b501bf2062$910e71b0$0501a8c0@noonoo>
References: <memo.19991027071732.138A@mbrickman.compulink.co.uk>
<00b501bf2062$910e71b0$0501a8c0@noonoo>
On Wed, Oct 27, 1999 at 11:03:45AM +0100, Tim Joyce wrote:
> can someone point me at documentation so that i can unserstand the results
> of an EXPLAIN, eg:
>
> Index Scan using words_id_idx on books_idx (cost=441.19 rows=7644 width=8)
>
> explain select * from books_idx where wrd_id=1;
>
> I am paticularly interested in what the rows= figure means.
I've picked up a little info on this from following the hackers list,
so I don't know what docs to point you at. My understanding is that the
rows= represents the number of tuples the optimizer estimates will be
returned by that step of the execution plan. In the example you've shown,
it's an index scan of a field, and the estimate (based on last know number
of tuples in the table (as of your last VACUUM ANALYZE) and an estimate
of the selectivity of the operator being applied to this index (<, =,
>, etc), and the approximate dispersion of the values in that field.
For more detail, I'd suggest checking the archives of the pgsql-hackers
list, and perhaps then asking on the list itself. There's some hints in the
"PostgreSQL Programmer's Guide" in the "Extending SQL" sections on functions,
operators, and interfacing them to indices.
Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: reedstrm@wallace.ece.rice.edu, tim@hoop.co.uk
Subject: Re: [GENERAL] QUERY PLAN:
In-Reply-To: <19991027100913.A21159@wallace.ece.rice.edu>
References: <memo.19991027071732.138A@mbrickman.compulink.co.uk> <00b501bf2062$910e71b0$0501a8c0@noonoo> <19991027100913.A21159@wallace.ece.rice.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox