Drop the general index on activities.
authorRoger Braun <roger@rogerbraun.net>
Tue, 20 Jun 2017 10:00:58 +0000 (12:00 +0200)
committerRoger Braun <roger@rogerbraun.net>
Tue, 20 Jun 2017 10:00:58 +0000 (12:00 +0200)
Indices should be more specific as the general index can lead to
slower queries because postgres can't estimate the specificity of
jsonb indexes very well.

priv/repo/migrations/20170620095947_remove_activities_index.exs [new file with mode: 0644]

diff --git a/priv/repo/migrations/20170620095947_remove_activities_index.exs b/priv/repo/migrations/20170620095947_remove_activities_index.exs
new file mode 100644 (file)
index 0000000..85feabe
--- /dev/null
@@ -0,0 +1,7 @@
+defmodule Pleroma.Repo.Migrations.RemoveActivitiesIndex do
+  use Ecto.Migration
+
+  def change do
+    drop index(:activities, [:data])
+  end
+end