Geo: Using NULL as a retry_at value won't use an index

The following discussion from !4719 (merged) should be addressed:

  • @yorickpeterse started a discussion:

    This won't be very efficient as (at least in past cases) PostgreSQL won't use an index for the retry_at IS NULL part. To make this work you'd either have to add a WHERE to the index (e.g. ON foo (id) WHERE retry_at IS NULL) or use some sort of sentinel value (e.g. 1900-01-01). This may not be an issue depending on the final query, but at least in isolation this scope may start misbehaving when scanning over a lot of rows.

Assignee Loading
Time tracking Loading