Skip to content
This repository has been 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 opened this issue Sep 30, 2019 · 0 comments
Closed

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

erikjohnston opened this issue Sep 30, 2019 · 0 comments
Labels
z-bug (Deprecated Label)

Comments

@erikjohnston
Copy link
Member

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) > (?, ?)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
z-bug (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

2 participants