Re: Ok, why isn't it using *this* index? - Mailing list pgsql-general

From Denis A. Doroshenko
Subject Re: Ok, why isn't it using *this* index?
Date
Msg-id 20010402001346.Y27437@comrade.omnitel.lan
Whole thread Raw
In response to Re: Ok, why isn't it using *this* index?  (Paul Tomblin <ptomblin@xcski.com>)
List pgsql-general
On Sun, Apr 01, 2001 at 05:11:46PM -0400, Paul Tomblin wrote:
> Ok, so if I understand you correctly, the fact that about 90% of the
> records have country='USA' and about 9% of the records have
> country='CANADA' means that it's never going to use the index because it
> on average, a query is going to be for USA, and a sequential scan is going
> to be better.
>
> I think I understand now.  If this is correct, then doesn't it make sense
> just to drop that index?  At least until I get a lot more data from other
> countries?

huh, this seems to be ineteresting to know, just because this
"feature" may seriously affect effectivity. by the way, have you tried
to disable sequential scan? that may force pgsql to use an index in
any case, AFAIK.

--
Denis A. Doroshenko  [GPRS/IN/WAP, VAS group engineer] .-.        _|_  |
[Omnitel Ltd., T.Sevcenkos st. 25, Vilnius, Lithuania] | | _ _  _ .| _ |
[Phone: +370 9863486 E-mail: d.doroshenko@omnitel.net] |_|| | || |||(/_|_

pgsql-general by date:

Previous
From: Joel Burton
Date:
Subject: Re: Can I get the default value for an attribute (field) ?
Next
From: Paul Tomblin
Date:
Subject: Re: How do I...