This repository has been archived by the owner on Jan 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: caching true cardinalities, 22x speedup for TPC-H SF1 (#124)
**Summary**: Instead of executing queries every time we run cardtest (takes multiple minutes even for scale factor 1.0), we cache the true cardinalities from the first execution. **Demo**: 22x speedup (29m55s -> 1m21s) on TPC-H scale factor 1 ![Screenshot 2024-03-21 at 21 06 10](https://github.com/cmu-db/optd/assets/20631215/ccd4d117-42c9-4420-a3dc-b4137a18a2ea) ![Screenshot 2024-03-21 at 21 05 32](https://github.com/cmu-db/optd/assets/20631215/a694a566-3b80-4ed3-8394-d27d54e5b7f2) JSON cache file ![Screenshot 2024-03-21 at 19 00 09](https://github.com/cmu-db/optd/assets/20631215/374a7a1c-d6b7-495f-86bb-233c3629abe9) **Details**: * We now call `VACUUM FULL ANALYZE` in Postgres right after loading data to create stats, which we weren't doing before. * Because Postgres is faster and less buggy than optd+DataFusion, we only get truecards from Postgres. * Fixed bug where `dbname` and `tables/` were parameterized by the seed, which would make us miss caching opportunities. --------- Co-authored-by: Zhidong Guo <[email protected]>
- Loading branch information
1 parent
368bcd6
commit 9dfbb47
Showing
14 changed files
with
169 additions
and
64 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
/.DS_Store | ||
/.idea | ||
.history | ||
**/*_workspace/** | ||
**/*_workspace/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
mod benchmark; | ||
pub mod cardtest; | ||
mod datafusion_db; | ||
mod postgres_db; | ||
mod datafusion_dbms; | ||
mod postgres_dbms; | ||
pub mod shell; | ||
pub mod tpch; | ||
mod truecard_cache; |
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.