FIREFLY-2059: Table query optimization#1982
Open
loitly wants to merge 1 commit into
Open
Conversation
- Root problem: every sort/filter fully copied every column of every matching row into a new table - Thin index instead of full copy: store just (ROW_IDX, ROW_NUM) for the resultset, cheap regardless of table width. - Resultset as a view joining that index to DATA, projecting only requested columns, so every existing consumer keeps working unchanged. - Healpix index kept separate: its own small (ROW_IDX, pixel) table, computed once and joined at query time, instead of a persisted column on the shared resultset
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: https://jira.ipac.caltech.edu/browse/FIREFLY-2059
Test: https://firefly-2059-table-query-optimization.irsakubedev.ipac.caltech.edu/firefly/
Compare this with the nightly build: https://firefly.irsakubedev.ipac.caltech.edu/firefly/
Try this: 10 million rows, 150 columns. The same FITS table converted into parquet to avoid high memory usage during loading. https://irsawebdev1.ipac.caltech.edu:9201/test-data/10m-150col.parquet
You’ll notice a significant performance improvement during sorting and filtering.
These smaller tables work smoothly.
https://irsawebdev1.ipac.caltech.edu:9201/test-data/table_1mil.parquet
https://irsawebdev1.ipac.caltech.edu:9201/test-data/wise-1_6-million.tbl