From 62ca2617cda39f9dcafcdd1cc64d1b2ea38271cd Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sun, 17 Sep 2017 14:05:53 +0200 Subject: [PATCH] Add tag index. This still isn't optimal, but at least it isn't super slow. --- priv/repo/migrations/20170917120416_add_tag_index.exs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 priv/repo/migrations/20170917120416_add_tag_index.exs diff --git a/priv/repo/migrations/20170917120416_add_tag_index.exs b/priv/repo/migrations/20170917120416_add_tag_index.exs new file mode 100644 index 000000000..d9391dda9 --- /dev/null +++ b/priv/repo/migrations/20170917120416_add_tag_index.exs @@ -0,0 +1,9 @@ +defmodule Pleroma.Repo.Migrations.AddTagIndex do + use Ecto.Migration + + @disable_ddl_transaction true + + def change do + create index(:activities, ["(data #> '{\"object\",\"tag\"}')"], concurrently: true, using: :gin, name: :activities_tags) + end +end -- 2.45.2