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

Vectorized aggregation with grouping by one fixed-size column #7341

Open
wants to merge 36 commits into
base: main
Choose a base branch
from

Conversation

akuzm
Copy link
Member

@akuzm akuzm commented Oct 14, 2024

This is a simplified implementation that uses the Postgres simplehash hash table with a generic Datum key for by-value fixed-size compressed columns.

The biggest improvement on a "sensible" query is about 90%, and a couple of queries show bigger improvements but these are very synthetic cases that don't make much sense:
https://grafana.ops.savannah-dev.timescale.com/d/fasYic_4z/compare-akuzm?orgId=1&var-branch=All&var-run1=3815&var-run2=3816&var-threshold=0.02&var-use_historical_thresholds=true&var-threshold_expression=2%20%2A%20percentile_cont%280.90%29&var-exact_suite_version=false&from=now-2d&to=now

Copy link

codecov bot commented Oct 14, 2024

Codecov Report

Attention: Patch coverage is 88.25215% with 41 lines in your changes missing coverage. Please review.

Project coverage is 82.23%. Comparing base (59f50f2) to head (cd7a1dc).
Report is 399 commits behind head on main.

Files with missing lines Patch % Lines
tsl/src/nodes/vector_agg/grouping_policy_hash.c 82.21% 23 Missing and 14 partials ⚠️
tsl/src/nodes/vector_agg/plan.c 75.00% 0 Missing and 3 partials ⚠️
tsl/src/nodes/vector_agg/exec.c 92.30% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7341      +/-   ##
==========================================
+ Coverage   80.06%   82.23%   +2.16%     
==========================================
  Files         190      219      +29     
  Lines       37181    39141    +1960     
  Branches     9450    10081     +631     
==========================================
+ Hits        29770    32188    +2418     
+ Misses       2997     2938      -59     
+ Partials     4414     4015     -399     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@akuzm akuzm marked this pull request as ready for review October 16, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant