Create additional indexes for system performance.

This commit is contained in:
Patrick Fic
2022-02-01 14:36:48 -08:00
parent 83b51384c7
commit 4bce6d996e
43 changed files with 64 additions and 0 deletions

View File

@@ -815,6 +815,7 @@
- email
- enforce_class
- enforce_referral
- entegral_id
- features
- federal_tax_id
- id

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "appointments_bodyshopid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "appointments_bodyshopid" on
"public"."appointments" using btree ("bodyshopid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "appointments_jobid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "appointments_jobid" on
"public"."appointments" using btree ("jobid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "appointments_start";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "appointments_start" on
"public"."appointments" using btree ("start");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "appointments_end";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "appointments_end" on
"public"."appointments" using btree ("end");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "associations_bodyshopid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "associations_bodyshopid" on
"public"."associations" using btree ("shopid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "associations_useremail";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "associations_useremail" on
"public"."associations" using btree ("useremail");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "invoicelines_billid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "invoicelines_billid" on
"public"."billlines" using btree ("billid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "invoicelines_jobid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "invoicelines_jobid" on
"public"."billlines" using btree ("joblineid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "bills_jobid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "bills_jobid" on
"public"."bills" using btree ("jobid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "conversations_shopid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "conversations_shopid" on
"public"."conversations" using btree ("bodyshopid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "documents_shopid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "documents_shopid" on
"public"."documents" using btree ("bodyshopid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "documents_jobid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "documents_jobid" on
"public"."documents" using btree ("jobid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "documents_billid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "documents_billid" on
"public"."documents" using btree ("billid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "jobline_jobid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "jobline_jobid" on
"public"."joblines" using btree ("jobid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "jobs_updatedat";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "jobs_updatedat" on
"public"."jobs" using btree ("updated_at");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "jobs_bodyshopid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "jobs_bodyshopid" on
"public"."jobs" using btree ("shopid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "messages_conversationid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "messages_conversationid" on
"public"."messages" using btree ("conversationid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "timetickets_jobid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "timetickets_jobid" on
"public"."timetickets" using btree ("jobid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "parts_orders_jobid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "parts_orders_jobid" on
"public"."parts_orders" using btree ("jobid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "parts_order_lines_poid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "parts_order_lines_poid" on
"public"."parts_order_lines" using btree ("orderid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "parts_order_lines_joblineid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "parts_order_lines_joblineid" on
"public"."parts_order_lines" using btree ("job_line_id");