"Thomas T. Thai" <tom@minnesota.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