-
Problem report
-
Resolution: Unresolved
-
Blocker
-
7.0.12, 7.2.6
-
None
-
7.2.5/TimescaleDB 2.17+
-
S25-W18/19
-
1
Steps to reproduce:
- Try to open some latest data for 3 hours.
- Get DB stuck on SQL like this.
Result:
SELECT h.itemid,h.value,h.clock FROM history_uint h JOIN (SELECT h2.itemid,h2.clock,MAX(h2.ns) AS ns FROM history_uint h2 JOIN (SELECT itemid,MAX(clock) AS clock FROM history_uint WHERE itemid=50709419 AND clock>='1745856891' AND clock<='1745867691' GROUP BY itemid) s2 ON h2.itemid=s2.itemid AND h2.clock=s2.clock GROUP BY h2.itemid,h2.clock) s ON h.itemid=s.itemid AND h.clock=s.clock AND h.ns=s.ns
Detailed explain: https://space.zabbix.com/s/LkobaxXYkngC36d
Instead of returned 300 values, system tries to get 17 billion of records
Enable or Disableing seq_scan option doesn't help.
Refreshing vacuum/analyse stats has no effect also, same explain results.
Expected:
JOIN is not used, to avoid causing decompression of all history_uint table.
- caused by
-
ZBXNEXT-8496 Capacity planning capability in dashboards/widgets
-
- Closed
-