From b1ffbf17d3da90f4c509a47c9fd876304ed9e3fc Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 2 Mar 2010 12:06:40 -0800 Subject: [PATCH] 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. --- plugins/SphinxSearch/sphinxsearch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'); } } -- 2.39.5