Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enclave DB: add composite index for canonical batch height #2037

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion go/enclave/storage/init/edgelessdb/001_init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ create table if not exists obsdb.batch
INDEX USING HASH (hash),
INDEX USING HASH (l1_proof_hash),
INDEX (l1_proof),
INDEX (height)
INDEX (height),
INDEX (is_canonical, is_executed, height)
);
GRANT ALL ON obsdb.batch TO obscuro;

Expand Down
1 change: 1 addition & 0 deletions go/enclave/storage/init/sqlite/001_init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ create index IDX_BATCH_HASH on batch (hash);
create index IDX_BATCH_BLOCK on batch (l1_proof_hash);
create index IDX_BATCH_L1 on batch (l1_proof);
create index IDX_BATCH_HEIGHT on batch (height);
create index IDX_BATCH_HEIGHT_COMP on batch (is_canonical, is_executed, height);

create table if not exists tx
(
Expand Down