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

Queries on versioned_kv stream slow down with large number of keys #764

Open
nabil-monoceros opened this issue Jun 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nabil-monoceros
Copy link

Describe what's wrong

image

A versioned_kv stream with the following counts

select count() from table(options_iv_greeks_versioned) settings compact_kv_stream=false;

689612

And unique count

select count() from table(options_iv_greeks_versioned) settings compact_kv_stream=true;

364742

We noticed that simple queries such as select count(*) from table_name have been taking much longer as the number of total versions increased. After speaking with Ken, the likely cause is that lots of keys are not compacted in the background as it is an async process.

We tried to run optimize table table_name FINAL to force compaction but that did not seem to work.

How to reproduce
Generate similar versioned_kv stream with above properties and attempt to run a count(*) query.

Error message and/or stacktrace

N/A

Additional context

N/A

@nabil-monoceros nabil-monoceros added the bug Something isn't working label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant