projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f26539
)
Use index on refresh_counter_cache
author
Roman Chvanikov
<chvanikoff@pm.me>
Sat, 9 May 2020 10:13:26 +0000
(13:13 +0300)
committer
Roman Chvanikov
<chvanikoff@pm.me>
Sat, 9 May 2020 10:13:26 +0000
(13:13 +0300)
lib/mix/tasks/pleroma/refresh_counter_cache.ex
patch
|
blob
|
history
diff --git
a/lib/mix/tasks/pleroma/refresh_counter_cache.ex
b/lib/mix/tasks/pleroma/refresh_counter_cache.ex
index b44e2545d08b6fc4f7b799eed585e0e31ac2dd4f..efcbaa3b1e9fc9962ae2a2a770059db4358ee4bd 100644
(file)
--- a/
lib/mix/tasks/pleroma/refresh_counter_cache.ex
+++ b/
lib/mix/tasks/pleroma/refresh_counter_cache.ex
@@
-42,7
+42,7
@@
defmodule Mix.Tasks.Pleroma.RefreshCounterCache 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(