Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix index for ethflow_orders table #2836

Merged
merged 6 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions database/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ EthFlow orders get created with the very generic [`ICoWSwapOnchainOrders`](https

Indexes:
- PRIMARY KEY: btree(`uid`)
- ethflow\_user\_valid\_to: btree(`valid_to`)

### ethflow\_refunds

Expand Down
5 changes: 5 additions & 0 deletions database/sql/V067__create_index_on_ethflow_orders.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- To get all valid orders quickly, we create an index
CREATE INDEX ethflow_user_valid_to ON ethflow_orders USING BTREE (valid_to);

-- Remove wrongly added index in V031__create_ethflow_orders.sql
DROP INDEX user_valid_to;
Loading