ccaominh opened a new pull request #9267: Join microbenchmark URL: https://github.com/apache/druid/pull/9267 ### Description Add microbenchmark for joins. Enabling the column cache improves performance by ~70% for the benchmarks for joins with string keys. Adjusting `LookupJoinMatcher.matchCondition()` to have fewer branches, improves performance by ~10% for the benchmarks for joins with lookups. #### Baseline (no cache, no optimization) ``` Benchmark Score Error Units baseSegment 3.026 ± 0.102 ms/op baseSegmentWithFilter 0.440 ± 0.003 ms/op joinIndexedTableLongKey 15.444 ± 0.444 ms/op joinIndexedTableLongKeyWithFilter 16.644 ± 0.704 ms/op joinIndexedTableStringKey 37.832 ± 0.166 ms/op joinIndexedTableStringKeyWithFilter 40.523 ± 0.798 ms/op joinLookupLongKey 20.483 ± 0.183 ms/op joinLookupLongKeyWithFilter 21.538 ± 0.204 ms/op joinLookupStringKey 38.405 ± 0.187 ms/op joinLookupStringKeyWithFilter 38.328 ± 0.595 ms/op lookupVirtualColumnLongKey 3.728 ± 0.115 ms/op lookupVirtualColumnLongKeyWithFilter 5.058 ± 0.024 ms/op lookupVirtualColumnStringKey 3.360 ± 0.148 ms/op lookupVirtualColumnStringKeyWithFilter 5.350 ± 0.038 ms/op ``` #### Column Cache Enabled ``` Benchmark Score Error Units joinIndexedTableStringKey 25.368 ± 0.267 ms/op joinIndexedTableStringKeyWithFilter 23.879 ± 0.461 ms/op joinLookupStringKey 22.682 ± 0.496 ms/op joinLookupStringKeyWithFilter 19.440 ± 0.061 ms/op ``` #### Column Cache Enabled and Join Lookup Optimization ``` Benchmark Score Error Units joinLookupLongKey 18.434 ± 0.121 ms/op joinLookupLongKeyWithFilter 21.176 ± 0.158 ms/op joinLookupStringKey 18.313 ± 0.140 ms/op joinLookupStringKeyWithFilter 17.604 ± 0.086 ms/op ``` <hr> This PR has: - [x] been self-reviewed.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
