generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: optimise console timeline query (#631)
Before (~3s): https://www.pgexplain.dev/plan/02fdabad-f469-45ae-a493-6757083ad307 After (7ms): https://www.pgexplain.dev/plan/f92f1325-11a7-4166-862d-7490e80adb71 The issue lay in `JOIN e.deployment_id = d.id`. For reasons that are still unknown, replacing this with a static `WHERE e.deployment_id IN (x, y, z)` completely fixes the query. This makes the Go code quite a bit uglier, but until (or if) we figure out how to make the single query fast this will have to suffice, as I spent hours trying to make it work to no avail.
- Loading branch information
1 parent
1b542a0
commit b1c6f89
Showing
1 changed file
with
44 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters