From 9aa4739773612d2bf0bb3ea563e5d76edfee956b Mon Sep 17 00:00:00 2001 From: spashii Date: Tue, 25 Aug 2026 15:47:35 +0200 Subject: [PATCH] directus: index processing_status by project and by chunk processing_status is an event log of three million rows keyed by conversation. Directus resolves it as a relation on every project and every chunk read, and neither column had an index, so each read was a sequential scan of the whole table. Set is_indexed on project_id and conversation_chunk_id through the Directus API on a local instance and pulled the snapshot, so a schema push creates the same indexes with the names Directus expects. --- .../fields/processing_status/conversation_chunk_id.json | 2 +- .../sync/snapshot/fields/processing_status/project_id.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/echo/directus/sync/snapshot/fields/processing_status/conversation_chunk_id.json b/echo/directus/sync/snapshot/fields/processing_status/conversation_chunk_id.json index 17fe280f7..22f19628e 100644 --- a/echo/directus/sync/snapshot/fields/processing_status/conversation_chunk_id.json +++ b/echo/directus/sync/snapshot/fields/processing_status/conversation_chunk_id.json @@ -38,7 +38,7 @@ "numeric_scale": null, "is_nullable": true, "is_unique": false, - "is_indexed": false, + "is_indexed": true, "is_primary_key": false, "is_generated": false, "generation_expression": null, diff --git a/echo/directus/sync/snapshot/fields/processing_status/project_id.json b/echo/directus/sync/snapshot/fields/processing_status/project_id.json index 01f4a4cc5..45afc79d7 100644 --- a/echo/directus/sync/snapshot/fields/processing_status/project_id.json +++ b/echo/directus/sync/snapshot/fields/processing_status/project_id.json @@ -40,7 +40,7 @@ "numeric_scale": null, "is_nullable": true, "is_unique": false, - "is_indexed": false, + "is_indexed": true, "is_primary_key": false, "is_generated": false, "generation_expression": null,