From: lain Date: Sat, 21 Apr 2018 07:22:31 +0000 (+0200) Subject: Make search use id index too. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=ff5e9574760accbf92f6e351819e1566b835002e;p=akkoma Make search use id index too. Seems to be faster in general, query planner chooses well. --- diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index 8b3492332..c84c226e8 100644 --- 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