Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.

Using DistinctCountHLL instead of DistinctCount AND division after aggregation for leveraging startree#22

Merged
Harnoor-se7en merged 4 commits intorzp_mainfrom
feat/distinct_count_support_startree
Jul 19, 2022
Merged

Using DistinctCountHLL instead of DistinctCount AND division after aggregation for leveraging startree#22
Harnoor-se7en merged 4 commits intorzp_mainfrom
feat/distinct_count_support_startree

Conversation

@Harnoor-se7en
Copy link
Copy Markdown

@Harnoor-se7en Harnoor-se7en commented Jul 14, 2022

Startree index doesn't work on the DISTINCTCOUNT operator and we have slow queries having DISTINCTCOUNT agg and SUM(DIV(num_calls, 86400.0)).
Because the results of the queries of these operators cannot be merged across startree nodes, Hence we need to change them to DISTINCTCOUNTHLL and Select SUM(numcalls)/86400.0. In the last meeting with Laxman where I was getting the below startree indices doc reviewed by him, I raised the above and some other doubts.
https://docs.google.com/document/d/1BfP6qzNlXN7euDfmceHTN5gYpkKuqcg9v1QDurk6ERk/edit#bookmark=id.x4llp69ulvpt
They also had the same issue and they fixed it 2 weeks back in hypertrace/query-service#143 and hypertrace/query-service#147. Hence am picking the same change.

Changes

  1. added DistinctCountHLL support (will add configuration in Kube manifests) and from now on we will be using this operator instead of DistinctCount.
  2. changed DIV(x,y) to (x/y).
  3. few refactoring.
  4. changed (x/y) to (x)/y

@Harnoor-se7en Harnoor-se7en changed the title support configuring distinct count agg function for leveraging startree Using DistinctCountHLL instead of DistinctCount for leveraging startree Jul 14, 2022
@Harnoor-se7en Harnoor-se7en changed the title Using DistinctCountHLL instead of DistinctCount for leveraging startree Using DistinctCountHLL instead of DistinctCount AND division after aggregation for leveraging startree Jul 14, 2022
@Harnoor-se7en Harnoor-se7en merged commit 247f15e into rzp_main Jul 19, 2022
@Harnoor-se7en Harnoor-se7en deleted the feat/distinct_count_support_startree branch July 19, 2022 11:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants