From: | "Denis A(dot) Doroshenko" <d(dot)doroshenko(at)omnitel(dot)net> |
---|---|
To: | Paul Tomblin <ptomblin(at)xcski(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Ok, why isn't it using *this* index? |
Date: | 2001-04-01 22:13:46 |
Message-ID: | 20010402001346.Y27437@comrade.omnitel.lan |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)doroshenko(at)omnitel(dot)net] |_|| | || |||(/_|_
From | Date | Subject | |
---|---|---|---|
Next Message | Paul Tomblin | 2001-04-01 22:16:04 | Re: How do I... |
Previous Message | Sean Harding | 2001-04-01 21:34:11 | Re: another index question |