Skip to content

Comparison with composite to optimize performance? #182

@thojanssens

Description

@thojanssens

If I'm not wrong, currently the where condition for the cursor values is built in this format:

where cursor_field1 > x and cursor_field2 > y

But we could use a composite value (when the fields are compared with same operator)?

where (cursor_field1, cursor_field2) > (x, y)

A composite is ordered left-to-right with further right fields only breaking ties.

So I think it is faster as the fields on the right are only compared in case of ties?

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