From cdd52aba5d3273044e2f4df7a7c2d8c59092ed91 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Tue, 29 Sep 2026 19:41:55 -0500 Subject: [PATCH] Revert "perf(cdclient): index the columns the lazy lookups search by" This reverts commit 3780ce042b7edda8d080168745d7a6825a68cdae. --- migrations/cdserver/8_lookup_indexes.sql | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 migrations/cdserver/8_lookup_indexes.sql diff --git a/migrations/cdserver/8_lookup_indexes.sql b/migrations/cdserver/8_lookup_indexes.sql deleted file mode 100644 index 1a4e0486d..000000000 --- a/migrations/cdserver/8_lookup_indexes.sql +++ /dev/null @@ -1,9 +0,0 @@ --- The converted CDClient has no indexes, so every lazy lookup by id scans its whole table (ComponentsRegistry: about --- 51000 rows, 3.5 ms a query). Loading a player with a big inventory did thousands of them on the world's main loop. -CREATE INDEX IF NOT EXISTS idx_ComponentsRegistry_id ON ComponentsRegistry (id); -CREATE INDEX IF NOT EXISTS idx_ItemComponent_id ON ItemComponent (id); -CREATE INDEX IF NOT EXISTS idx_Objects_id ON Objects (id); -CREATE INDEX IF NOT EXISTS idx_LootMatrix_LootMatrixIndex ON LootMatrix (LootMatrixIndex); -CREATE INDEX IF NOT EXISTS idx_LootTable_LootTableIndex ON LootTable (LootTableIndex); -CREATE INDEX IF NOT EXISTS idx_PlayerFlags_id ON PlayerFlags (id); -CREATE INDEX IF NOT EXISTS idx_Animations_animationGroupID ON Animations (animationGroupID, animation_type);