Re: avoiding seq scans when two columns are very correlated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 15, 2011 at 11:08 AM, Stuart Bishop <stuart@xxxxxxxxxxxxxxxx> wrote:
> On Fri, Nov 11, 2011 at 10:01 PM, Ruslan Zakirov <ruz@xxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx>
> http://www.stuartbishop.net/
>



-- 
Best regards, Ruslan.

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux