summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-08-16 19:48:04 +0000
committerDries Buytaert <dries@buytaert.net>2005-08-16 19:48:04 +0000
commitb114336554781011cce6fe4e72a20a2812c174cf (patch)
treef8e9206f296dfb470c1dc4f930c3383e600d6f27 /modules
parent26fa7c730f878220a46478c47f6145f459f68688 (diff)
downloadbrdo-b114336554781011cce6fe4e72a20a2812c174cf.tar.gz
brdo-b114336554781011cce6fe4e72a20a2812c174cf.tar.bz2
- Patch #28924 by Jeremy: simplified 'group by'-clause to improve performance.
Diffstat (limited to 'modules')
-rw-r--r--modules/statistics.module2
-rw-r--r--modules/statistics/statistics.module2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/statistics.module b/modules/statistics.module
index 4c9f40762..62a347e33 100644
--- a/modules/statistics.module
+++ b/modules/statistics.module
@@ -250,7 +250,7 @@ function statistics_recent_hits($type = 'all', $id = 0) {
* Menu callback; presents the "top pages" page.
*/
function statistics_top_pages() {
- $sql = "SELECT COUNT(path) AS hits, path, title, AVG(timer) AS average_time, SUM(timer) AS total_time FROM {accesslog} GROUP BY path, title";
+ $sql = "SELECT COUNT(path) AS hits, path, title, AVG(timer) AS average_time, SUM(timer) AS total_time FROM {accesslog} GROUP BY path";
$sql_cnt = "SELECT COUNT(DISTINCT(path)) FROM {accesslog}";
$header = array(
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index 4c9f40762..62a347e33 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/statistics.module
@@ -250,7 +250,7 @@ function statistics_recent_hits($type = 'all', $id = 0) {
* Menu callback; presents the "top pages" page.
*/
function statistics_top_pages() {
- $sql = "SELECT COUNT(path) AS hits, path, title, AVG(timer) AS average_time, SUM(timer) AS total_time FROM {accesslog} GROUP BY path, title";
+ $sql = "SELECT COUNT(path) AS hits, path, title, AVG(timer) AS average_time, SUM(timer) AS total_time FROM {accesslog} GROUP BY path";
$sql_cnt = "SELECT COUNT(DISTINCT(path)) FROM {accesslog}";
$header = array(