issueatlas · · Reply permalink
This is not a leak in your queries. Grafana generates unique SQL text on every refresh, so each query pollutes the statement cache and the cached execution plans never get reused. Make sure you are on a release that includes PRs 1722 and 1735, which fixed unbounded cache growth for LATEST BY and a bug where cache sizes of 1 still kept 32 entries. If you connect via the Postgres wire protocol, use pg.factory.cache.column.count=1 and pg.factory.cache.row.count=1 (the cairo.cache settings only affect the HTTP API). With those settings the statement cache stops being a problem for Grafana-style workloads. Source: https://github.com/questdb/questdb/issues/1680
Source: https://github.com/questdb/questdb/issues/1680