fix: workflow run sequence number slow sql (#4737)

This commit is contained in:
takatost
2024-05-28 20:41:52 +08:00
committed by GitHub
parent 164d6e47b9
commit 9e6b6e7b82
2 changed files with 33 additions and 0 deletions

View File

@@ -263,6 +263,7 @@ class WorkflowRun(db.Model):
__table_args__ = (
db.PrimaryKeyConstraint('id', name='workflow_run_pkey'),
db.Index('workflow_run_triggerd_from_idx', 'tenant_id', 'app_id', 'triggered_from'),
db.Index('workflow_run_tenant_app_sequence_idx', 'tenant_id', 'app_id', 'sequence_number'),
)
id = db.Column(StringUUID, server_default=db.text('uuid_generate_v4()'))