Skip to content

Missing Index Candidate (ARCH3058)

Key typescript.orm.missing-index-candidate · Severity info · Category orm

When an entity column is repeatedly used in filter/order/lookup predicates but has no index declaration, the database performs a full scan. Add an index to frequently queried columns.

@Entity()
export class User {
@Column()
email: string; // frequently searched in where, no index
}
@Entity()
export class User {
@Index()
@Column()
email: string;
}

Add @Index or a schema-level DB index to columns frequently filtered/ordered.