Optimize projects_with_tracing_enabled query
What does this MR do?
Optimizes the projects_with_tracing_enabled
counter query for batch counting in usage data
Part of issue #208923 (closed)
Query
SELECT COUNT("project_tracing_settings"."id") FROM "project_tracing_settings" WHERE "project_tracing_settings"."id" BETWEEN 0 AND 9999;
Optimization
No optimization needed, see: https://explain.depesz.com/s/9nvt
Timing
Time: 0.351 ms
- planning: 0.146 ms
- execution: 0.205 ms
- I/O read: 0.046 ms
- I/O write: 0.000 ms
Shared buffers:
- hits: 4 (~32.00 KiB) from the buffer pool
- reads: 1 (~8.00 KiB) from the OS file cache, including disk I/O
- dirtied: 0
- writes: 0
Edited by Alex Buijs