chore: optimize SQL queries that perform partial full table scans (#24786)

This commit is contained in:
Novice
2025-09-02 11:46:11 +08:00
committed by GitHub
parent be3af1e234
commit ca96350707
5 changed files with 83 additions and 10 deletions

View File

@@ -835,6 +835,7 @@ class WorkflowAppLog(Base):
__table_args__ = (
sa.PrimaryKeyConstraint("id", name="workflow_app_log_pkey"),
sa.Index("workflow_app_log_app_idx", "tenant_id", "app_id"),
sa.Index("workflow_app_log_workflow_run_id_idx", "workflow_run_id"),
)
id: Mapped[str] = mapped_column(StringUUID, server_default=sa.text("uuid_generate_v4()"))