Skip to content

Commit bb4ae91

Browse files
authored
Merge pull request #115 from vulcanize/btree_index
Btree index
2 parents 55d2466 + e2dc523 commit bb4ae91

File tree

2 files changed

+175
-97
lines changed

2 files changed

+175
-97
lines changed

statediff/db/migrations/00013_create_cid_indexes.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ CREATE INDEX state_mh_index ON eth.state_cids USING btree (mh_key);
4747

4848
CREATE INDEX state_path_index ON eth.state_cids USING btree (state_path);
4949

50+
CREATE INDEX state_node_type_index ON eth.state_cids USING btree (node_type);
51+
5052
-- storage node indexes
5153
CREATE INDEX storage_state_id_index ON eth.storage_cids USING btree (state_id);
5254

@@ -58,6 +60,8 @@ CREATE INDEX storage_mh_index ON eth.storage_cids USING btree (mh_key);
5860

5961
CREATE INDEX storage_path_index ON eth.storage_cids USING btree (storage_path);
6062

63+
CREATE INDEX storage_node_type_index ON eth.storage_cids USING btree (node_type);
64+
6165
-- state accounts indexes
6266
CREATE INDEX account_state_id_index ON eth.state_accounts USING btree (state_id);
6367

@@ -69,13 +73,15 @@ DROP INDEX eth.storage_root_index;
6973
DROP INDEX eth.account_state_id_index;
7074

7175
-- storage node indexes
76+
DROP INDEX eth.storage_node_type_index;
7277
DROP INDEX eth.storage_path_index;
7378
DROP INDEX eth.storage_mh_index;
7479
DROP INDEX eth.storage_cid_index;
7580
DROP INDEX eth.storage_leaf_key_index;
7681
DROP INDEX eth.storage_state_id_index;
7782

7883
-- state node indexes
84+
DROP INDEX eth.state_node_type_index;
7985
DROP INDEX eth.state_path_index;
8086
DROP INDEX eth.state_mh_index;
8187
DROP INDEX eth.state_cid_index;

0 commit comments

Comments
 (0)