[Bug] two fixed bucket pk table join to fixed bucket table cause low performance
- Dominant language
- Java
- Stars
- 3.4k
- Forks
- 1.4k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 396
Description
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar.
### Paimon version
My two paimon tables are both primary key tables with a fixed bucket size of 16. I'm using Spark SQL to execute a join statement on these two tables. One table has 80 million records, and the other has 150 million records. Using my SQL left join, writing to the non-primary key table (without a bucket key) is the fastest. However, if I write to a table with a fixed bucket key or dynamic bucketing, it becomes more than twice as slow. How can I eliminate the requirement for the primary key table to use fixed or dynamic bucketing? Otherwise, it severely impacts computational performance.
### Compute Engine
spark 3.5.2
### Minimal reproduce step
table A and B have same pk and same fixed bucket number,
table C same fixed bucket number,
insert into c
select * from A left join B on a.id=b.id and a.id1=b.id2
### What doesn't meet your expectations?
i can setting table c use no bucket mode to improve performance
### Anything else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Spark 3.5.2 reproduction using primary-key tables A and B, fixed bucket size 16, and an insert into table C, comparing fixed or dynamic bucketing with no bucket mode. Measure the left-join performance and trace the relevant Paimon table-writing and bucketing behavior; done means the reproducible slowdown is explained and a concrete performance improvement or supported limitation is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- spark, sql
- Domain
- data-engineering, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100