Skip to content

Add composite index on aggregate table#2199

Open
eiffel777 wants to merge 10 commits into
ubccr:mainfrom
eiffel777:change-aggregate-table-indexes
Open

Add composite index on aggregate table#2199
eiffel777 wants to merge 10 commits into
ubccr:mainfrom
eiffel777:change-aggregate-table-indexes

Conversation

@eiffel777
Copy link
Copy Markdown
Contributor

@eiffel777 eiffel777 commented Apr 20, 2026

This changes the indexes for dimension values to be composite indexes with the aggregation unit id as the first column. The improves performance and let's the query be run without using STRAIGHT_JOIN to get optimal performance.

Because of the new indexes, some statistics have slightly different values. I have updated the affected integration and regression tests. I also added a sql file to the upgrade section in bootstrap.sh to drop and re-create the indexes on modw_aggregates.jobfact_by_day as this was the only way I could get a consistent result between the fresh install and upgrade tests.

Tests performed

Tested in docker and on xdmod-dev

Checklist:

  • The pull request description is suitable for a Changelog entry
  • The milestone is set correctly on the pull request
  • The appropriate labels have been added to the pull request

@eiffel777 eiffel777 added this to the 11.5.0 milestone Apr 20, 2026
@eiffel777 eiffel777 self-assigned this Apr 20, 2026
@eiffel777 eiffel777 added enhancement Enhancement of the functionality of an existing feature Category:General General labels Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Category:General General enhancement Enhancement of the functionality of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants