From 1c9f0c2bed51eb240d8514d28993c5516c019afc Mon Sep 17 00:00:00 2001 From: Nutomic Date: Wed, 7 Jun 2023 17:31:24 +0200 Subject: [PATCH] Add db index for post.url column (#2929) * Add db index for post.url column As mentioned in https://github.com/LemmyNet/lemmy/issues/2877#issuecomment-1576439829 Not sure if its preferable to do this, or make a combined index which includes post.nsfw, post.removed, post.deleted * remove unique --- migrations/2023-06-06-104440_index_post_url/down.sql | 1 + migrations/2023-06-06-104440_index_post_url/up.sql | 1 + 2 files changed, 2 insertions(+) create mode 100644 migrations/2023-06-06-104440_index_post_url/down.sql create mode 100644 migrations/2023-06-06-104440_index_post_url/up.sql diff --git a/migrations/2023-06-06-104440_index_post_url/down.sql b/migrations/2023-06-06-104440_index_post_url/down.sql new file mode 100644 index 00000000..5a60b131 --- /dev/null +++ b/migrations/2023-06-06-104440_index_post_url/down.sql @@ -0,0 +1 @@ +drop index idx_post_url; diff --git a/migrations/2023-06-06-104440_index_post_url/up.sql b/migrations/2023-06-06-104440_index_post_url/up.sql new file mode 100644 index 00000000..4f8ea66f --- /dev/null +++ b/migrations/2023-06-06-104440_index_post_url/up.sql @@ -0,0 +1 @@ +create index idx_post_url on post(url); -- 2.44.1