Browse Source

优化收入记录实体中的索引,合并并重命名索引以提升查询性能。

wuyi 3 tháng trước cách đây
mục cha
commit
5721cd04a9
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/entities/income-records.entity.ts

+ 2 - 2
src/entities/income-records.entity.ts

@@ -19,8 +19,8 @@ export enum OrderType {
 @Entity()
 @Index('idx_agent_date_type', ['agentId', 'createdAt', 'incomeType'])
 @Index('idx_user_date', ['userId', 'createdAt'])
-@Index('idx_del_flag', ['delFlag'])
-@Index('idx_status', ['status'])
+@Index('idx_agent_date_del_type', ['agentId', 'createdAt', 'delFlag', 'incomeType'])
+@Index('idx_user_date_del', ['userId', 'createdAt', 'delFlag'])
 export class IncomeRecords {
   @PrimaryGeneratedColumn()
   id: number