From 8affb2564b016e5317aaeba169c3a2582a9a4004 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 1 Jan 2026 12:49:12 -0500 Subject: [PATCH] explains the fk index on tags --- .../quartz/nip01Core/store/sqlite/EventIndexesModule.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip01Core/store/sqlite/EventIndexesModule.kt b/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip01Core/store/sqlite/EventIndexesModule.kt index bd3d90ef3..a7e887c33 100644 --- a/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip01Core/store/sqlite/EventIndexesModule.kt +++ b/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip01Core/store/sqlite/EventIndexesModule.kt @@ -72,6 +72,7 @@ class EventIndexesModule( // need to check if this is actually needed. db.execSQL("CREATE INDEX query_by_created_at_kind_key ON event_headers (created_at DESC, kind, pubkey)") + // makes deletions on the event_header fast db.execSQL("CREATE INDEX fk_event_tags_header_id ON event_tags (event_header_row_id)") // This is a very slow index to build (half the insert time goes here) but it is extremely effective.