Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: add copy option MAX_FILE_WRITE_THREADS #15611

Open
youngsofun opened this issue May 22, 2024 · 2 comments
Open

Feature: add copy option MAX_FILE_WRITE_THREADS #15611

youngsofun opened this issue May 22, 2024 · 2 comments
Labels
C-feature Category: feature

Comments

@youngsofun
Copy link
Member

Summary

after #15596, the file size control for parquet is improved.
but when there are many threads, blocks are likely to eventually be distributed to the writer threads, and result in relative small files.

a grouping processor is used to group small blocks to MAX_FILE_SIZE before distributed to the writer threads. but its based on uncompressed size, so may result in files with size MAX_FILE_SIZE/compress_ratio

user can change the setting max_threads, but this will affect the whole plan.

compress ratio estimator

another automated approach is to enhance the grouping processor with a compress ratio estimator,

  1. compress ratio may be diff from block to block
  2. grouping larger mem of blocks cost more tmp memory
@BohuTANG
Copy link
Member

BohuTANG commented May 22, 2024

We can use the /*+ SET_VAR(max_threads=1) */ to only set the copy, no need an new option?

@youngsofun
Copy link
Member Author

max_threads=1 will slow down the whole query, including the source and computing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature
Projects
None yet
Development

No branches or pull requests

2 participants