pf_logid arrives pre-sorted off its index, so the planner picks an Incremental Sort GroupAggregate on the strength of that "free" sort — but comparing 30+ grouping columns per row makes it 5-7x slower in practice than a HashAggregate. Confirmed via EXPLAIN ANALYZE on fc_osm_skinny_34: 34-50s sorted vs ~7-10s hashed, independent of work_mem or stats (ANALYZE didn't change the plan choice). Scoped to this transaction only, since disabling incremental sort globally could hurt some other query's plan. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| auth.js | ||
| layouts.js | ||
| log.js | ||
| operations.js | ||
| plans.js | ||
| sources.js | ||
| tables.js | ||
| versions.js | ||