mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-07 22:24:06 -05:00
improvement(performance): remove unused source/target indices, add index on snapshot id (#1603)
This commit is contained in:
3
packages/db/migrations/0098_thick_prima.sql
Normal file
3
packages/db/migrations/0098_thick_prima.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
DROP INDEX "workflow_edges_source_block_idx";--> statement-breakpoint
|
||||
DROP INDEX "workflow_edges_target_block_idx";--> statement-breakpoint
|
||||
CREATE INDEX "workflow_execution_logs_state_snapshot_id_idx" ON "workflow_execution_logs" USING btree ("state_snapshot_id");
|
||||
6958
packages/db/migrations/meta/0098_snapshot.json
Normal file
6958
packages/db/migrations/meta/0098_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -680,6 +680,13 @@
|
||||
"when": 1759963094548,
|
||||
"tag": "0097_dazzling_mephisto",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 98,
|
||||
"version": "7",
|
||||
"when": 1760206888564,
|
||||
"tag": "0098_thick_prima",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -216,8 +216,6 @@ export const workflowEdges = pgTable(
|
||||
},
|
||||
(table) => ({
|
||||
workflowIdIdx: index('workflow_edges_workflow_id_idx').on(table.workflowId),
|
||||
sourceBlockIdx: index('workflow_edges_source_block_idx').on(table.sourceBlockId),
|
||||
targetBlockIdx: index('workflow_edges_target_block_idx').on(table.targetBlockId),
|
||||
workflowSourceIdx: index('workflow_edges_workflow_source_idx').on(
|
||||
table.workflowId,
|
||||
table.sourceBlockId
|
||||
@@ -306,6 +304,9 @@ export const workflowExecutionLogs = pgTable(
|
||||
(table) => ({
|
||||
workflowIdIdx: index('workflow_execution_logs_workflow_id_idx').on(table.workflowId),
|
||||
executionIdIdx: index('workflow_execution_logs_execution_id_idx').on(table.executionId),
|
||||
stateSnapshotIdIdx: index('workflow_execution_logs_state_snapshot_id_idx').on(
|
||||
table.stateSnapshotId
|
||||
),
|
||||
triggerIdx: index('workflow_execution_logs_trigger_idx').on(table.trigger),
|
||||
levelIdx: index('workflow_execution_logs_level_idx').on(table.level),
|
||||
startedAtIdx: index('workflow_execution_logs_started_at_idx').on(table.startedAt),
|
||||
|
||||
Reference in New Issue
Block a user