Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cubestore): partitioned indexes for faster joins
The index will ensure the data from multiple tables is partitioned with the same keys and collocated on the same machines. This allows to evenly distribute the work on JOIN queries and avoid duplicating same keys on different machines. However, we need more work to keep partitions at async on ingestion and compaction. ``` CREATE PARTITIONED INDEX schema.pindex(id int, url text); CREATE TABLE schema.foo(some_id int, some_url text, data text) ADD TO PARTITIONED INDEX pindex(some_id, some_url); CREATE TABLE schema.bar(other_id int, other_url text, other_data text) ADD TO PARTITIONED INDEX pindex(other_id, other_url); SELECT some_id, data, other_data FROM schema.foo f JOIN schema.bar b ON f.some_id = b.other_id AND f.some_url = b.other_url ``` This is an early version. There are known problems and limitations: - `DROP TABLE` might cancel multi-index partitioning, - There is no way to remove the index, i.e. `DROP PARTITIONED INDEX`, - Performance with large number of tables is yet to be evaluated. Mostly tested on random data and simple queries, we expect to find more issues and fixes before we stabilize and bring this to CubeJS.
- Loading branch information
1 parent
108a4e3
commit 8ca605f
Showing
24 changed files
with
2,725 additions
and
504 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.