commit: ff5e9574760accbf92f6e351819e1566b835002e
parent: a61e8ac15473aca6d0ec9ef20df981bcef9d5897
Author: lain <lain@soykaf.club>
Date: Sat, 21 Apr 2018 09:22:31 +0200
Make search use id index too.
Seems to be faster in general, query planner chooses well.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -521,7 +521,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
^query
),
limit: 20,
- order_by: [desc: :inserted_at]
+ order_by: [desc: :id]
)
statuses = Repo.all(q) ++ fetched