From: Brion Vibber Date: Tue, 2 Mar 2010 20:06:40 +0000 (-0800) Subject: Performance fix on Sphinx search results: use id instead of created timestamp for... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b1ffbf17d3da90f4c509a47c9fd876304ed9e3fc;p=quix0rs-gnu-social.git Performance fix on Sphinx search results: use id instead of created timestamp for reverse date sorting; should give same result but doesn't trigger a filesort. --- diff --git a/plugins/SphinxSearch/sphinxsearch.php b/plugins/SphinxSearch/sphinxsearch.php index 71f3308281..654b9c9d5b 100644 --- a/plugins/SphinxSearch/sphinxsearch.php +++ b/plugins/SphinxSearch/sphinxsearch.php @@ -75,7 +75,7 @@ class SphinxSearch extends SearchEngine { if ('chron' === $mode) { $this->sphinx->SetSortMode(SPH_SORT_ATTR_DESC, 'created_ts'); - return $this->target->orderBy('created desc'); + return $this->target->orderBy('id desc'); } }