Open jbgi opened 1 year ago
Is this for 13.1.0.0.? Many things have vhanged there related to indexes and unique keys
13.0.4
In 13.1.0.0
most unique keys are removed and most indexes are create after syncing has almost completed. Possible there are still unecessary indexes though that take space.
Btw 13.0.4
has a critical issue that 13.0.5
fixes https://github.com/input-output-hk/cardano-db-sync/issues/1222
Some indexes are not necessary because already part of composite indexes :
idx_tx_out_tx_id ON tx_out(tx_id)
already done byTABLE "tx_out" ADD CONSTRAINT "unique_txout" UNIQUE("tx_id","index")
idx_tx_in_tx_out_id ON tx_in(tx_out_id)
already done byTABLE "tx_in" ADD CONSTRAINT "unique_txin" UNIQUE("tx_out_id","tx_out_index")'
idx_pool_update_registered_tx_id ON pool_update(registered_tx_id)
already done byTABLE "pool_update" ADD CONSTRAINT "unique_pool_update" UNIQUE("registered_tx_id","cert_index")'
INDEX idx_pool_retire_announced_tx_id ON pool_retire(announced_tx_id)
already done byTABLE "pool_retire" ADD CONSTRAINT "unique_pool_retiring" UNIQUE("announced_tx_id","cert_index")'
idx_pool_relay_update_id
already done byunique_pool_relay
idx_reward_addr_id
already done byunique_reward
idx_withdrawal_addr_id
already done byunique_withdrawal
idx_treasury_addr_id
already done byunique_treasury
idx_reserve_addr_id
byunique_reserves