Re: INDEX issues - Mailing list pgsql-admin

From Tom Lane
Subject Re: INDEX issues
Date
Msg-id 9504.1017849331@sss.pgh.pa.us
Whole thread Raw
In response to INDEX issues  ("Nicholay P. Chuprynin" <kolyan@infoport.uz>)
List pgsql-admin
"Nicholay P. Chuprynin" <kolyan@infoport.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

pgsql-admin by date:

Previous
From: Trevor Astrope
Date:
Subject: Data Loss After Restore?
Next
From: Dan Langille
Date:
Subject: Re: Data Loss After Restore?