Re: help with getting index scan

From: Doug McNaught <doug(at)wireboard(dot)com>
To: "Thomas T(dot) Thai" <tom(at)minnesota(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: help with getting index scan
Date: 2002-02-25 16:00:51
Message-ID: m3lmdhzh3g.fsf@varsoon.denali.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"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.

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
--T. J. Jackson, 1863

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Replogle 2002-02-25 16:03:18 pg_dump gives segmentation fault and cores
Previous Message Thomas T. Thai 2002-02-25 15:55:25 Re: help with getting index scan