Skip to content

IS NOT NULL / IS DISTINCT FROM NULL should use index #7797

Open
@EPluribusUnum

Description

@EPluribusUnum

Hi *!

SELECT * FROM customer c WHERE c.country IS NOT NULL
SELECT * FROM customer c WHERE c.country IS DISTINCT FROM NULL

both PLAN is NATURAL.

for every data type there is an equivalent expression that uses index.
varchar : field >= ''
numeric : (field >=0 OR field < 0); or field>= "possible minimum value"
date/time : like numeric
boolean : field IN (TRUE, FALSE)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions