Better database index

This commit is contained in:
Kevin Cotugno 2017-09-10 13:06:53 -07:00
parent 0ac8c8bca2
commit 15c7221f9a

View File

@ -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);