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

Carefully consider flows_raw sorting key #30

Open
leoluk opened this issue May 28, 2020 · 1 comment
Open

Carefully consider flows_raw sorting key #30

leoluk opened this issue May 28, 2020 · 1 comment
Labels
clickhouse Database related issues

Comments

@leoluk
Copy link
Member

leoluk commented May 28, 2020

  • Optimize for main dasboard queries.
  • Low-cardinality values first for easy filtering (verify that this does what we think it does).
  • Sequence Num for sampling, but how? It's as high-cardinality as it gets.
  • Play with secondary idexes - are they more efficient than a carefully-considered sorting key?
@leoluk leoluk added this to the v1.0.0 milestone Jun 22, 2020
@fionera fionera added the clickhouse Database related issues label Dec 11, 2022
@UnamedRus
Copy link

UnamedRus commented Dec 26, 2022

Play with secondary idexes - are they more efficient than a carefully-considered sorting key?

No, they ~only make sense if you have some data locality for column used in skip index, (so there is some correlation between that column and table ORDER BY key) Some examples https://kb.altinity.com/altinity-kb-queries-and-syntax/skip-indexes/

Sequence Num for sampling, but how? It's as high-cardinality as it gets.

Sampling only make sense if you have good distribution of data across whole number range (min-max)

https://kb.altinity.com/altinity-kb-queries-and-syntax/altinity-kb-sample-by/

@fionera fionera removed this from the v1.0.0 milestone Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clickhouse Database related issues
Projects
None yet
Development

No branches or pull requests

3 participants