From: | Ruslan Zakirov <ruz(at)bestpractical(dot)com> |
---|---|
To: | Stuart Bishop <stuart(at)stuartbishop(dot)net> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: avoiding seq scans when two columns are very correlated |
Date: | 2011-11-15 15:04:28 |
Message-ID: | CAMOxC8stcOyn1HyCfmzwjki7EQ4edqLqNYv+v=Lt9Hq7rHeL5w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Tue, Nov 15, 2011 at 11:08 AM, Stuart Bishop <stuart(at)stuartbishop(dot)net> wrote:
> On Fri, Nov 11, 2011 at 10:01 PM, Ruslan Zakirov <ruz(at)bestpractical(dot)com> wrote:
>> Hello,
[snip]
>> In application such wrong estimation result in seq scan of this table
>> winning leading position in execution plans over other tables and
>> index scans.
>>
>> What can I do to avoid this problem?
>
> Does a partial index help? CREATE UNIQUE INDEX foo_idx ON mytab(id)
> WHERE id = EffectiveId
It doesn't help. Probably reason is the same as for partitions.
>
>
> --
> Stuart Bishop <stuart(at)stuartbishop(dot)net>
> http://www.stuartbishop.net/
>
--
Best regards, Ruslan.
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2011-11-15 20:48:33 | Re: What's the state of postgresql on ext4 now? |
Previous Message | Mario Weilguni | 2011-11-15 08:04:52 | Re: Large number of short lived connections - could a connection pool help? |