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

[Enhancement]: Support chunk skipping when one or more chunks have NULL values on the column for which skipping is enabled #7484

Open
kunjmehta opened this issue Nov 25, 2024 · 0 comments
Labels
enhancement An enhancement to an existing feature for functionality

Comments

@kunjmehta
Copy link

kunjmehta commented Nov 25, 2024

What type of enhancement is this?

API improvement

What subsystems and features will be improved?

Chunk skipping

What does the enhancement do?

Example use case: A hypertable H can have a new integer column C added at some point in time with only the newer data having values for C. This will mean that the older rows in H will have a NULL value in C.

Existing behaviour (v2.17.1) - Enabling chunk skipping on C, and calling compress_chunk(show_chunks(H)), results in the default value of range_start and range_end in _timescaledb_catalog.chunk_column_stats for the older chunks (with NULL values) to be the full range of the integer variable spanning (-9223372036854775808, 9223372036854775807)

This means the these chunks will always be included in the query and effectively means that there is no benefit of enabling chunk skipping on C

Suggested improvement - In the broader goal to make chunk skipping work when all rows in one or more chunks have default values or NULLs, suggest to use a different default value for range_start and range_end, or even have it possible to be defined by the user who potentially knows the range of values that their data will span

Also, happy to work on this myself if this is accepted

@kunjmehta kunjmehta added the enhancement An enhancement to an existing feature for functionality label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement to an existing feature for functionality
Projects
None yet
Development

No branches or pull requests

1 participant