Skip to content

Merging Statistics is slow when sum statistic is present #15809

Closed
vortex-data/vortex
#3088

Description

@robert3005

Is your feature request related to a problem or challenge?

If you have a datasource that reports a sum statistic then merging statistics for a file group is considerably slower when compared to cases without sum statistic. Profiling reveals it's mostly due to Precision<ScalarValue>::add doing a lot of extra work.

Describe the solution you'd like

Ideally we'd transpose the stats aggregation and aggregate them column wise instead of column group wise

Describe alternatives you've considered

No response

Additional context

Screenshots of Parquet and Vortex profiles from clickbench Q0 which is all just getting statistics. You can notice that roughly 50% of Vortex time is spent in aggregating stats

Image
Image

Activity

  1. changed the title [-]Merging Statistics is slow[/-] [+]Merging Statistics is slow when sum statistic is present[/+] on Apr 22, 2025
  2. adriangb commented on Oct 15, 2025

    @adriangb
    Contributor

    Discussed today in a call: could we refactor the logic to combine statistics by first converting them to a RecordBatch and then evaluating the combination in a vectorized fashion

  3. added a commit that references this issue on Mar 13, 2026
    d09ff92
  4. added a commit that references this issue on Mar 24, 2026
    119b074
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions