From 5278c74f6ba3e1cf40d16e5d7344eda7f1601e1d Mon Sep 17 00:00:00 2001 From: Moody Salem Date: Sun, 1 Dec 2024 10:44:40 -0500 Subject: [PATCH] add 2 indices --- src/dao.ts | 2 ++ 1 file changed, 2 insertions(+) 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 (