commit: 62ca2617cda39f9dcafcdd1cc64d1b2ea38271cd
parent: 6000f61727a4a9f07a4ddb19878696f764915cad
Author: Roger Braun <roger@rogerbraun.net>
Date: Sun, 17 Sep 2017 14:05:53 +0200
Add tag index.
This still isn't optimal, but at least it isn't super slow.
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/priv/repo/migrations/20170917120416_add_tag_index.exs 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