From 792353bb9e2af162b2656abed518c307c1764db4 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Tue, 25 Feb 2025 09:29:50 +0530 Subject: [PATCH] [server] Add index on file_data(user_id,updated_at) --- server/migrations/97_file_data_user_update_idx.down.sql | 1 + server/migrations/97_file_data_user_update_idx.up.sql | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 server/migrations/97_file_data_user_update_idx.down.sql create mode 100644 server/migrations/97_file_data_user_update_idx.up.sql diff --git a/server/migrations/97_file_data_user_update_idx.down.sql b/server/migrations/97_file_data_user_update_idx.down.sql new file mode 100644 index 0000000000..848321602e --- /dev/null +++ b/server/migrations/97_file_data_user_update_idx.down.sql @@ -0,0 +1 @@ +DROP INDEX CONCURRENTLY IF EXISTS idx_file_data_user_updated; diff --git a/server/migrations/97_file_data_user_update_idx.up.sql b/server/migrations/97_file_data_user_update_idx.up.sql new file mode 100644 index 0000000000..b0dc8ae140 --- /dev/null +++ b/server/migrations/97_file_data_user_update_idx.up.sql @@ -0,0 +1,2 @@ +CREATE INDEX CONCURRENTLY idx_file_data_user_updated + ON file_data (user_id, updated_at);