Skip to content

Commit 110be0e

Browse files
committed
Add some indexes for agent store
1 parent 14337f3 commit 110be0e

File tree

5 files changed

+2630
-0
lines changed

5 files changed

+2630
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
CREATE INDEX IF NOT EXISTS "idx_agent_run_completed_publisher_agent" ON "agent_run" USING btree ("publisher_id","agent_name") WHERE "agent_run"."status" = 'completed';--> statement-breakpoint
2+
CREATE INDEX IF NOT EXISTS "idx_agent_run_completed_recent" ON "agent_run" USING btree ("created_at","publisher_id","agent_name") WHERE "agent_run"."status" = 'completed';--> statement-breakpoint
3+
CREATE INDEX IF NOT EXISTS "idx_agent_run_completed_version" ON "agent_run" USING btree ("publisher_id","agent_name","agent_version","created_at") WHERE "agent_run"."status" = 'completed';--> statement-breakpoint
4+
CREATE INDEX IF NOT EXISTS "idx_agent_run_completed_user" ON "agent_run" USING btree ("user_id") WHERE "agent_run"."status" = 'completed';

0 commit comments

Comments
 (0)