updates order of columns in compound PKs, update indexes e.g. we don't need a btree index on a column if it is the first column in the compound PK index but we do need a btree index for the later columns in a compound PK (searches on first column of a compound index are just as fast as searches on a btree index for that column alone, but searches on the 2nd or 3rd column in a compound index are significantly slower than on dedicated indexes)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
-- +goose Up
|
||||
CREATE TABLE IF NOT EXISTS public.blocks (
|
||||
block_number BIGINT NOT NULL,
|
||||
key TEXT UNIQUE NOT NULL,
|
||||
key TEXT NOT NULL,
|
||||
data BYTEA NOT NULL,
|
||||
PRIMARY KEY (key, block_number)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user