Using locale C / COLLATE "C" to unlock ORCA performance for TPC-DS benchmarks #1604
Unanswered
yjhjstz
asked this question in
Ideas / Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Motivation
When running TPC-DS benchmarks on Cloudberry, we noticed that queries on string columns (item descriptions, store names, customer names, etc.) often cause ORCA to fall back to the Postgres planner. The root cause is that ORCA currently does not support columns with
COLLATE "C", as tracked in issue #717.Beyond fixing the fallback, there is a broader performance opportunity: locale C is significantly faster than locale-aware collations for string comparisons.
Performance Evidence
A detailed benchmark published by depesz — How much speed you are leaving at the table if you use default locale — shows:
Key takeaways:
libc/Ccollation is the fastest across nearly every benchmarkCurrent Behavior in Cloudberry / ORCA
This means for TPC-DS string columns defined with COLLATE "C", we lose ORCA's superior join ordering, parallel aggregation plans, and better sort/merge strategies.
Proposal
We have opened issue #1603 to track the work. The proposed steps are:
Discussion Questions
initdb) recommend or default toLC_COLLATE=Cfor analytical workloads?LC_COLLATE=Con Cloudberry? What were your findings?Would love to hear thoughts from the community, especially from contributors familiar with ORCA internals and anyone who has run TPC-DS benchmarks on Cloudberry.
References
Beta Was this translation helpful? Give feedback.
All reactions