From: rinpatch Date: Mon, 3 Jun 2019 16:26:43 +0000 (+0300) Subject: Add index on inReplyTo for objects X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=be56801ddab84d9e21af75c7752e5898fe0dbecb;p=akkoma Add index on inReplyTo for objects Fixes the performance of `get_existing_votes` --- diff --git a/priv/repo/migrations/20190603162018_add_object_in_reply_to_index.exs b/priv/repo/migrations/20190603162018_add_object_in_reply_to_index.exs new file mode 100644 index 000000000..df4ac7782 --- /dev/null +++ b/priv/repo/migrations/20190603162018_add_object_in_reply_to_index.exs @@ -0,0 +1,7 @@ +defmodule Pleroma.Repo.Migrations.AddObjectInReplyToIndex do + use Ecto.Migration + + def change do + create index(:objects, ["(data->>'inReplyTo')"], name: :objects_in_reply_to_index) + end +end