Re: Duplicate WHERE condition changes performance and plan

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

 



Why not vacuum analyze both tables to ensure stats are up to date? 

Have you customized default_statistics_target from 100? It may be that 250 would give you a more complete sample of the table without increasing the size of the stats tables too much such that planning time increases hugely.

Do you know if any of these columns are correlated? Custom stats with CREATE STATISTICS may help the planner make better decisions if so.

I usually hesitate to put any boolean field in an index. Do you need the proposal.has_been_anonymised false values only, if so you could add that to a WHERE condition on the index instead of including it as the leading column.

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

  Powered by Linux