Skip to content

Commit 110be0e

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

5 files changed

Lines changed: 2630 additions & 0 deletions

File tree

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)