Re: Index Scans become Seq Scans after VACUUM ANALYSE

From: Hannu Krosing <hannu(at)krosing(dot)net>
To: mlw <markw(at)mohawksoft(dot)com>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Louis-David Mitterrand <vindex(at)apartia(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Index Scans become Seq Scans after VACUUM ANALYSE
Date: 2002-04-17 06:36:09
Message-ID: 1019025396.1889.5.camel@rh72.home.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2002-04-17 at 11:00, mlw wrote:
>
> Here is the problem, in a single paragraph.
>
> If the DBA notices that there is a problem with a query, he adds an index, he
> notices that there is no difference, then he notices that PostgreSQL is not
> using his index. First and foremost he gets mad at PostgreSQL for not using his
> index.

Perhaps a notice from backend:

NOTICE: I see the DBA has created a useless index ...

;)

Or would this make the DBA even madder ;) ;)

> If PostgreSQL decided to use an index which increases execution time,
> the DBA would delete the index. If PostgreSQL does not use an index, he has to
> modify the posgresql.conf file,

Or just do

set enable_seqscan to off;

> which disallows PostgreSQL from using an index when it would be a clear loser.
>
> My assertion is this: "If a DBA creates an index, he has a basis for his
> actions."

The basis can be that "his boss told him to" ?

------------------
Hannu

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2002-04-17 06:53:48 Re: Index Scans become Seq Scans after VACUUM ANALYSE
Previous Message John Proctor 2002-04-17 06:22:14 Re: [SQL] 16 parameter limit