-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
I was looked on PostgreSQL schema and my eyes catched a few indices.
solana-accountsdb-connector/connector-raw/scripts/create_schema.sql
Lines 63 to 66 in c18632c
| PRIMARY KEY (pubkey_id, slot, write_version) | |
| ); | |
| CREATE INDEX account_write_searchkey on account_write(pubkey_id, slot DESC, write_version DESC); | |
| CREATE INDEX account_write_pubkey_id_idx on account_write(pubkey_id); |
It looks like
PRIMARY KEY can be replaced by CREATE UNIQUE INDEX account_write_searchkey.Not sure about index
account_write_pubkey_id_idx too, does it make sense to have it while we already have account_write_searchkey? Some queries are more efficient with pubkey index only?Metadata
Metadata
Assignees
Labels
No labels