ipld-eth-db/db/post_batch_processing_migrations/00018_create_log_indexes.sql

16 lines
692 B
MySQL
Raw Normal View History

-- +goose Up
2022-01-11 03:51:04 +00:00
CREATE INDEX log_mh_index ON eth.log_cids USING btree (leaf_mh_key);
CREATE INDEX block_number_index ON eth.header_cids USING brin (block_number);
2022-01-11 03:51:04 +00:00
CREATE INDEX header_block_hash_index ON eth.header_cids USING btree (block_hash);
CREATE INDEX tx_header_id_index ON eth.transaction_cids USING btree (header_id);
CREATE INDEX tx_tx_hash_index ON eth.transaction_cids USING btree (tx_hash);
CREATE INDEX log_cids_index ON eth.log_cids USING btree (rct_id, index);
-- +goose Down
2022-01-11 03:51:04 +00:00
DROP INDEX eth.log_cids_index;
DROP INDEX eth.tx_tx_hash_index;
DROP INDEX eth.tx_header_id_index;
DROP INDEX eth.header_block_hash_index;
DROP INDEX eth.block_number_index;
2022-01-11 03:51:04 +00:00
DROP INDEX eth.log_mh_index;