mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
feat(backend): Add database index for improved query performance (#10411)
This PR adds a database index to improve query performance based on Supabase query performance insights and index recommendations. These indexes target frequently queried columns and relationships to reduce query execution time. ### Changes 🏗️ - Added index on `AgentNodeExecutionInputOutput.agentPresetId` ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Verified schema changes are valid Prisma syntax - [x] Confirmed indexes target frequently queried columns based on Supabase recommendations - [x] Ensured no duplicate indexes are created #### For configuration changes: - [x] `.env.example` is updated or already compatible with my changes - [x] `docker-compose.yml` is updated or already compatible with my changes - [x] I have included a list of my configuration changes in the PR description (under **Changes**)
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
-- CreateIndex
|
||||
CREATE INDEX "AgentNodeExecutionInputOutput_agentPresetId_idx" ON "AgentNodeExecutionInputOutput"("agentPresetId");
|
||||
@@ -411,6 +411,7 @@ model AgentNodeExecutionInputOutput {
|
||||
@@index([referencedByOutputExecId])
|
||||
// Composite index for `upsert_execution_input`.
|
||||
@@index([name, time])
|
||||
@@index([agentPresetId])
|
||||
}
|
||||
|
||||
model AgentNodeExecutionKeyValueData {
|
||||
|
||||
Reference in New Issue
Block a user