Re: INDEX issues

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Nicholay P(dot) Chuprynin" <kolyan(at)infoport(dot)uz>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: INDEX issues
Date: 2002-04-03 15:55:31
Message-ID: 9504.1017849331@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Nicholay P. Chuprynin" <kolyan(at)infoport(dot)uz> writes:
> I switched enable_seqscan to 'false', restarted server and EXPLAINed the
> same query again:
> ...
> Now it uses index scan, but query takes MUCH more time than before (about
> an hour, and it's not finished yet).
> It seems very strange for me.

Indexscan over a large fraction of a table is not a win compared to
a sequential scan. Random access is just too expensive.

> Can someone explain what's wrong here?

Nothing. The planner knew what it was doing to prefer the seqscan.

regards, tom lane

In response to

  • INDEX issues at 2002-04-03 12:25:25 from Nicholay P. Chuprynin

Browse pgsql-admin by date

  From Date Subject
Next Message Trevor Astrope 2002-04-03 15:55:54 Data Loss After Restore?
Previous Message William Meloney 2002-04-03 13:08:42 Thing(s) that went bump in the night...