Fix inefficient plans in enum_blocks4hivemind by using LATERAL join
During performance tests, the planner occasionally produced suboptimal plans for the per-block aggregation query, resulting in repeated GroupAggregate executions and excessive CPU time. Switching to a LATERAL join makes the aggregation deterministic and consistently fast (~2s ? ~300ms per 1k blocks).
Loading
Please sign in to comment