Re: Index Scans become Seq Scans after VACUUM ANALYSE

From: mlw <markw(at)mohawksoft(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Andrew Sullivan <andrew(at)libertyrms(dot)info>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Index Scans become Seq Scans after VACUUM ANALYSE
Date: 2002-04-17 22:01:09
Message-ID: 3CBDF0A5.6C49BFA7@mohawksoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:

>
> OK, yes, sequential scan _can_ be as slow as index scan, but sometimes
> it is faster. Can you provide reasoning why index scan should be
> preferred, other than the admin created it, which I already addressed?

If you have a choice between two or more sub-plans, similar in cost, say within
20% of one another. Choosing a plan which uses an index has a chance of
improved performance if the estimates are wrong where as choosing the
sequential scan will always have the full cost.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dann Corbit 2002-04-17 22:03:25 Re: Index Scans become Seq Scans after VACUUM ANALYSE
Previous Message Bruce Momjian 2002-04-17 21:58:31 Re: [SQL] A bug in gistPageAddItem()/gist_tuple_replacekey() ???