Re: Why is a sort required for this query? (IS NULL predicate on leading key column)

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

 



Jerry Brenner <jbrenner@xxxxxxxxxxxxx> writes:
> I'm wondering why a sort is required for this query, as the index should be
> providing the required ordering to satisfy the ORDER BY clause.  Does it
> have to do with the IS NULL predicate on the leading key column in the
> index?

IS NULL is not seen as an equality condition, no.  It's pretty much
of a hack that makes it an indexable condition at all, and we don't
really do any advanced optimization with it.

			regards, tom lane





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

  Powered by Linux