Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Adding last seen to devices background update doesn't work #6134

Closed
@erikjohnston

Description

@erikjohnston

Two issues:

  1. The query to fetch the last seen time is wrong, and ends up fetching multiple rows per devices.
  2. The query also does a full index scan on postgres as it doesn't understand that the construct a > ? OR (a = ? and b > ?) is equivalent to (a, b) > (?, ?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    z-bug(Deprecated Label)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions