From e23aac706af75c98828bca05188b877174b80f40 Mon Sep 17 00:00:00 2001 From: John Ferlito Date: Tue, 3 Dec 2024 10:40:11 +1100 Subject: [PATCH] Fix slow OAI query --- .../20241202233312_add_private_index_to_collections.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 db/migrate/20241202233312_add_private_index_to_collections.rb diff --git a/db/migrate/20241202233312_add_private_index_to_collections.rb b/db/migrate/20241202233312_add_private_index_to_collections.rb new file mode 100644 index 00000000..f416f473 --- /dev/null +++ b/db/migrate/20241202233312_add_private_index_to_collections.rb @@ -0,0 +1,7 @@ +class AddPrivateIndexToCollections < ActiveRecord::Migration[8.0] + def change + add_index :collections, :private, name: 'index_collections_on_private' + + add_index :items, [:collection_id, :private, :updated_at] + end +end