From 5d9546fe8e2c08ee60f7d8b03f73618ef4eb33d8 Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 22 Dec 2016 14:16:44 +0100 Subject: [PATCH] PW-597 add indexes on the order-orders_fields table --- migrations/000.023.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 migrations/000.023.sql diff --git a/migrations/000.023.sql b/migrations/000.023.sql new file mode 100644 index 0000000..e54fc4e --- /dev/null +++ b/migrations/000.023.sql @@ -0,0 +1,18 @@ +-- PW-597 +DROP INDEX IF EXISTS ix_confirmed; + +CREATE INDEX ix_confirmed + ON "order-orders_fields" (value) + WHERE fieldid = 175; -- 4984 kB + +DROP INDEX IF EXISTS ix_creditinvoice; + +CREATE INDEX ix_creditinvoice + ON "order-orders_fields" (value) + WHERE fieldid = 199; -- 184 kB + +DROP INDEX IF EXISTS ix_invoiceid; + +CREATE INDEX ix_invoiceid + ON "order-orders_fields" (value) + WHERE fieldid = 172; -- 4360 kB