2021-02-05 06:15:28 +00:00
|
|
|
-- +up
|
|
|
|
DROP INDEX IF EXISTS trades_symbol;
|
|
|
|
DROP INDEX IF EXISTS trades_symbol_fee_currency;
|
|
|
|
DROP INDEX IF EXISTS trades_traded_at_symbol;
|
|
|
|
|
|
|
|
CREATE INDEX trades_symbol ON trades (exchange, symbol);
|
|
|
|
CREATE INDEX trades_symbol_fee_currency ON trades (exchange, symbol, fee_currency, traded_at);
|
|
|
|
CREATE INDEX trades_traded_at_symbol ON trades (exchange, traded_at, symbol);
|
|
|
|
|
|
|
|
-- +down
|
2021-02-05 06:20:07 +00:00
|
|
|
DROP INDEX IF EXISTS trades_symbol;
|
|
|
|
DROP INDEX IF EXISTS trades_symbol_fee_currency;
|
|
|
|
DROP INDEX IF EXISTS trades_traded_at_symbol;
|
2021-02-05 06:15:28 +00:00
|
|
|
|
|
|
|
CREATE INDEX trades_symbol ON trades (symbol);
|
|
|
|
CREATE INDEX trades_symbol_fee_currency ON trades (symbol, fee_currency, traded_at);
|
|
|
|
CREATE INDEX trades_traded_at_symbol ON trades (traded_at, symbol);
|
|
|
|
|
|
|
|
|