Re: help with getting index scan

From: "Thomas T(dot) Thai" <tom(at)minnesota(dot)com>
To: Doug McNaught <doug(at)wireboard(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: help with getting index scan
Date: 2002-02-25 16:23:05
Message-ID: Pine.NEB.4.43.0202251021520.26912-100000@ns01.minnesota.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 25 Feb 2002, Doug McNaught wrote:

> "Thomas T. Thai" <tom(at)minnesota(dot)com> writes:
>
> > On 25 Feb 2002, Doug McNaught wrote:
> > > Well, EXPLAIN is indicating (unless I misread it) that the estimate of
> > > rows returned is 336702, so it's not surprising that it opts for a
> > > sequential scan. Is this under 7.1 or 7.2? The latter keeps much
> > > better statistics about table populations...
> >
> > this is under 7.2. is there away to force it to use index scan? cause
> > right now when i'm searching using a cat reference, it's taking a few
> > seconds.
>
> I'm still suspicious that something is wrong, but you can do
>
> SET enable_seqscan TO off;
>
> before your query and see if it helps your performance. If it makes a
> significant difference let us know--Tom may be interested in trying to
> improve the statistics.

i just tried turning off seq scan and the query still takes up to 8
seconds which is 7 seconds too long. btw, how do you clean the cache
from the last query?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-02-25 16:30:41 Re: help with getting index scan
Previous Message Stephan Szabo 2002-02-25 16:20:30 Re: Work Around For Oracle Feature