Files
documentdb/pg_helio_core/sql/schema
Vinod Sridharan 53bf641ad3 Merged PR 1300971: [Hash] Improve Group/Distinct/Lookup Performance
### Does this PR have any customer impact?
Yes - in 1.16
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Perf
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Yes
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description

In Postgres default behavior for Group by/Distinct is to ORDER BY the Grouping term/Distinct which means building a tuple sort + Ordering it before doing the group.

However, if the type defines a hash operator class then the GROUP will use a HashAgg instead of OrderedAgg which is better since it only needs to handle equality (and not Sorted).

Implement a bson hash operator class and add it to 1.15. When the schema deploys it will automatically pick this in the planner.
2024-03-22 11:28:50 +03:00
..