Re: checking for a NULL date in a partitioned table kills performance

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

 



On Thu, Aug 22, 2024 at 4:32 PM Sbob <sbob@xxxxxxxxxxxxxxxxxxxxx> wrote:

29 million of the 32 million rows in the table have NULL for contract_date


Your expectation that this query should use an index is flawed.  Indexes are for highly selective queries.  Finding nulls on that table is not selective.

David J.


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

  Powered by Linux