作者 郑周

1 增加表索引

@@ -10,4 +10,16 @@ CREATE INDEX IF NOT EXISTS idx_user_follow_from_user_id on "public".user_follow @@ -10,4 +10,16 @@ CREATE INDEX IF NOT EXISTS idx_user_follow_from_user_id on "public".user_follow
10 10
11 -- 角色表 11 -- 角色表
12 -- (公司ID)索引 12 -- (公司ID)索引
13 -CREATE INDEX IF NOT EXISTS idx_role_company_id ON "public"."role" USING btree(company_id);  
  13 +CREATE INDEX IF NOT EXISTS idx_role_company_id ON "public"."role" USING btree(company_id);
  14 +
  15 +-- 部门表
  16 +-- (公司ID)索引
  17 +CREATE INDEX IF NOT EXISTS idx_department_company_id ON "public"."department" USING btree(company_id);
  18 +
  19 +-- 系统消息表
  20 +-- (公司ID)索引
  21 +CREATE INDEX IF NOT EXISTS idx_message_system_company_id ON "public"."message_system" USING btree(company_id);
  22 +
  23 +-- 业务消息表
  24 +-- (公司ID)索引
  25 +CREATE INDEX IF NOT EXISTS idx_message_business_company_id ON "public"."message_business" USING btree(company_id);