Rich-T-kid commented on PR #26348: URL: https://github.com/apache/datafusion/pull/26348#issuecomment-6218294635
### NDV cap sweep Mean/distribution totals; lower is better. | Cap | TPCH | ClickBench | Notes | | ---: | --- | --- | --- | | 100 | [744.20 -> 737.80 ms, 0.86% faster](https://github.com/apache/datafusion/pull/26348#issuecomment-6217468904) | [21062.87 -> 21042.05 ms, 0.10% faster](https://github.com/apache/datafusion/pull/26348#issuecomment-6217604235) | Does not promote `MobilePhoneModel` in every file | | 218 | [747.76 -> 749.51 ms, 0.23% slower](https://github.com/apache/datafusion/pull/26348#issuecomment-6218159490) | [20070.46 -> 19948.02 ms, 0.61% faster](https://github.com/apache/datafusion/pull/26348#issuecomment-6218250376) | Smallest cap that promotes `MobilePhoneModel` everywhere | | 250 | [796.30 -> 786.57 ms, 1.22% faster](https://github.com/apache/datafusion/pull/26348#issuecomment-6217853296) | [19921.72 -> 20257.66 ms, 1.69% slower](https://github.com/apache/datafusion/pull/26348#issuecomment-6217942471) | Same promoted schema as 218 | | 500 | [731.90 -> 736.51 ms, 0.63% slower](https://github.com/apache/datafusion/pull/26348#issuecomment-6217493765) | [20210.83 -> 20144.09 ms, 0.33% faster](https://github.com/apache/datafusion/pull/26348#issuecomment-6217604299) | Admits more TPCH and ClickBench columns | Caps 218 and 250 produce the same schema, so their opposite suite deltas show the end-to-end result is within runner variance. I would use 218: lower excludes the ClickBench target, while raising it only admits fields that standard ClickBench reads through Q23's `SELECT *`. ### Regression buckets - **Unrelated runner variance:** every statistically flagged ClickBench regression reads numeric or high-cardinality columns, not a promoted dictionary column. The largest changes are isolated outliers with overlapping distributions. - **ClickBench schema adaptation:** Q23 is the relevant pressure case. A cap-218 Samply profile attributes about 22% of sampled CPU to rebuilding dictionaries after `binary_as_string` (`resolve_key`, hashing, offset expansion, `memcmp`, and builder append). This cannot be removed by lowering the cap without also dropping `MobilePhoneModel`. - **TPCH scalar predicates:** dictionary comparison evaluates the dictionary values once, then expands the result through `arrow_select::take::take_bits`. It was about 1% of Q19 samples at cap 218 and 4.8% of Q12 samples at cap 500. Keeping the cap below `l_shipmode`'s 371 avoids the larger Q12 cost. - **TPCH grouping:** the dictionary group/hash path is healthy. Q1 was 8.4% faster in a local repeated run and replaced `Utf8View` hashing/equality with the dictionary-specialized path, although the bot result was statistically neutral. The next useful optimization is preserving the physical dictionary through `binary_as_string` schema adaptation. More cap tuning will not turn ClickBench into a repeatable suite-level win. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
