Use index on refresh_counter_cache
This commit is contained in:
parent
4f26539717
commit
56819f7f06
|
@ -42,7 +42,7 @@ defp instance_counters(instance) do
|
|||
|
||||
Activity
|
||||
|> where([a], fragment("(? ->> 'type'::text) = 'Create'", a.data))
|
||||
|> where([a], like(a.actor, ^"%#{instance}%"))
|
||||
|> where([a], fragment("split_part(?, '/', 3) = ?", a.actor, ^instance))
|
||||
|> select(
|
||||
[a],
|
||||
{fragment(
|
||||
|
|
Loading…
Reference in a new issue