Commit 9619b00
fix: only emit early after skip probe evaluates and decides not to skip
The early emission was firing before the skip aggregation probe
could evaluate (needs 100K rows), causing regressions for very
high-cardinality GROUP BY queries (e.g. Q32 GROUP BY WatchID,
ClientIP was 1.53x slower).
Fix: only enable early emission AFTER the skip probe has evaluated
and decided NOT to skip. This ensures:
- Before 100K rows: no early emission (let probe evaluate first)
- High cardinality (ratio >= 0.8): skip probe takes over, no emission
- Medium cardinality (ratio < 0.8): early emission keeps hash table
cache-friendly
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 966b507 commit 9619b00
1 file changed
Lines changed: 5 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
825 | 825 | | |
826 | 826 | | |
827 | 827 | | |
828 | | - | |
829 | | - | |
830 | | - | |
831 | | - | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
836 | 833 | | |
837 | 834 | | |
838 | 835 | | |
| |||
0 commit comments