diff --git a/src/dao.ts b/src/dao.ts index c8477aa..a0b74e1 100644 --- a/src/dao.ts +++ b/src/dao.ts @@ -698,6 +698,7 @@ export class DAO { CREATE INDEX IF NOT EXISTS idx_twamm_order_updates_key_hash_time ON twamm_order_updates USING btree (key_hash, start_time, end_time); CREATE INDEX IF NOT EXISTS idx_twamm_order_updates_owner_salt ON twamm_order_updates USING btree (owner, salt); CREATE INDEX IF NOT EXISTS idx_twamm_order_updates_salt ON twamm_order_updates USING btree (salt); + CREATE INDEX IF NOT EXISTS idx_twamm_order_updates_salt_key_hash_start_end_owner_event_id ON twamm_order_updates(salt, key_hash, start_time, end_time, owner, event_id); CREATE TABLE IF NOT EXISTS twamm_proceeds_withdrawals ( @@ -716,6 +717,7 @@ export class DAO { CREATE INDEX IF NOT EXISTS idx_twamm_proceeds_withdrawals_key_hash_time ON twamm_proceeds_withdrawals USING btree (key_hash, start_time, end_time); CREATE INDEX IF NOT EXISTS idx_twamm_proceeds_withdrawals_owner_salt ON twamm_proceeds_withdrawals USING btree (owner, salt); CREATE INDEX IF NOT EXISTS idx_twamm_proceeds_withdrawals_salt ON twamm_proceeds_withdrawals USING btree (salt); + CREATE INDEX IF NOT EXISTS idx_twamm_proceeds_withdrawals_salt_event_id_desc ON twamm_proceeds_withdrawals(salt, event_id DESC); CREATE TABLE IF NOT EXISTS twamm_virtual_order_executions (