From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jaime Casanova <systemguards@gmail.com>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: performance pgsql <pgsql-performance@postgresql.org>
Subject: Re: estimated rows vs. actual rows
Date: Sun, 13 Feb 2005 22:38:01 -0500
Message-ID: <19674.1108352281@sss.pgh.pa.us> (raw)
In-Reply-To: <c2d9e70e05021319182db34831@mail.gmail.com>
References: <c2d9e70e0502131327c95e63d@mail.gmail.com>
<200502131341.09811.josh@agliodbs.com>
<c2d9e70e05021319182db34831@mail.gmail.com>
Jaime Casanova <systemguards@gmail.com> writes:
> But, IMHO, if the table has 143902 and it thinks will retrieve 2610
> (almost 1.81% of the total). it won't be faster with an index?
That's almost one row in fifty. We don't know how wide the table is,
but it's certainly possible that there are order-of-a-hundred rows
on each page; in which case the indexscan is likely to hit every page.
Twice. Not in sequence. Only if the selected rows are pretty well
clustered in a small part of the table is this going to be a win
over a seqscan.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, systemguards@gmail.com, josh@agliodbs.com
Subject: Re: estimated rows vs. actual rows
In-Reply-To: <19674.1108352281@sss.pgh.pa.us>
* 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