Skip to content

When using an index for sorting, the index is ignored when also using NULLS LAST/FIRST #699

@hendriks73

Description

@hendriks73

When NULLS FIRST is the default order, the index should be used for sorting when NULLS FIRST is specified, as it does not change anything. But currently the index is ignored.

Example:

CREATE TABLE my_table(K1 INT);
CREATE INDEX my_index ON my_table(K1);
EXPLAIN PLAN FOR SELECT * FROM my_table ORDER BY K1 ASC NULLS FIRST;

This should lead to an explanation containing

/* index sorted */

See also

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions