From: Mr. E23 Date: Tue, 27 Jan 2004 15:14:57 +0000 (+0000) Subject: Minor speed improvement on list of long/short pages X-Git-Tag: 1.3.0beta1~1089 X-Git-Url: http://git.cyclocoop.org/%22.%20%20%20generer_url_action%28%22logout%22%2C%22logout=prive%22%29%20.%20%20%20%22?a=commitdiff_plain;h=2794096b6cf518c98b9e688da460660b17480106;p=lhc%2Fweb%2Fwiklou.git Minor speed improvement on list of long/short pages --- diff --git a/includes/SpecialLongpages.php b/includes/SpecialLongpages.php index e4c0ed7999..567f9a6b7f 100644 --- a/includes/SpecialLongpages.php +++ b/includes/SpecialLongpages.php @@ -14,8 +14,8 @@ class LongPagesPage extends QueryPage { function getSQL( $offset, $limit ) { return "SELECT cur_title, LENGTH(cur_text) AS len FROM cur " . - "WHERE cur_namespace=0 AND cur_is_redirect=0 ORDER BY " . - "LENGTH(cur_text) DESC LIMIT {$offset}, {$limit}"; + "WHERE cur_namespace=0 AND cur_is_redirect=0 ORDER BY len DESC " . + "LIMIT {$offset}, {$limit}"; } function formatResult( $skin, $result ) { diff --git a/includes/SpecialShortpages.php b/includes/SpecialShortpages.php index c68e072c0a..a34bb3605a 100644 --- a/includes/SpecialShortpages.php +++ b/includes/SpecialShortpages.php @@ -14,8 +14,8 @@ class ShortPagesPage extends QueryPage { function getSQL( $offset, $limit ) { return "SELECT cur_title, LENGTH(cur_text) AS len FROM cur " . - "WHERE cur_namespace=0 AND cur_is_redirect=0 ORDER BY " . - "LENGTH(cur_text) LIMIT {$offset}, {$limit}"; + "WHERE cur_namespace=0 AND cur_is_redirect=0 ORDER BY len " . + "LIMIT {$offset}, {$limit}"; } function formatResult( $skin, $result ) {