Better database index
This commit is contained in:
parent
0ac8c8bca2
commit
15c7221f9a
@ -8,8 +8,8 @@ CREATE TABLE trades (
|
||||
sell BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
timestamp TIMESTAMPTZ NOT NULL);
|
||||
|
||||
CREATE UNIQUE INDEX trade_id_product_INDEX ON trades (
|
||||
trade_id,
|
||||
product);
|
||||
CREATE UNIQUE INDEX product_trade_id_index ON trades (
|
||||
product,
|
||||
trade_id);
|
||||
|
||||
CREATE INDEX timestamp_index ON trades (timestamp);
|
||||
|
Reference in New Issue
Block a user