Use index on refresh_counter_cache

This commit is contained in:
Roman Chvanikov 2020-05-09 13:13:26 +03:00
parent 4f26539717
commit 56819f7f06
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ defp instance_counters(instance) do
Activity Activity
|> where([a], fragment("(? ->> 'type'::text) = 'Create'", a.data)) |> where([a], fragment("(? ->> 'type'::text) = 'Create'", a.data))
|> where([a], like(a.actor, ^"%#{instance}%")) |> where([a], fragment("split_part(?, '/', 3) = ?", a.actor, ^instance))
|> select( |> select(
[a], [a],
{fragment( {fragment(