diff options
author | diosmosis <benaka@piwik.pro> | 2015-02-13 04:08:08 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-02-13 04:08:19 +0300 |
commit | 27bfdedb690e9bd705b78b4e5c41900b3a7afb6e (patch) | |
tree | 4bd9f25a9fe45eb43a2e4e60c82d6f387bb6dfe4 | |
parent | 36552040aae75f428ede3cf224ebd143ef4c3b3e (diff) |
Refs #6436, #7112 fix performance regression, assume there are not duplicates in DB when doing segment query foraction since group by in sub-query is slow.2.11.0-b5
-rw-r--r-- | core/Tracker/TableLogAction.php | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/core/Tracker/TableLogAction.php b/core/Tracker/TableLogAction.php index 4308f042f8..fe620035d7 100644 --- a/core/Tracker/TableLogAction.php +++ b/core/Tracker/TableLogAction.php @@ -61,10 +61,7 @@ class TableLogAction { // now, we handle the cases =@ (contains) and !@ (does not contain) // build the expression based on the match type - $sql = 'SELECT MIN(idaction) AS idaction FROM ' . Common::prefixTable('log_action') . ' WHERE %s AND type = ' . $actionType . ' )' - . ' GROUP BY name, hash, type'; // group by is to avoid possible case of duplicates in log_action table - // (duplicates can exist if php tracker fails right after inserting a duplicate in - // Tracker\Model::insertNewAction()) + $sql = 'SELECT idaction FROM ' . Common::prefixTable('log_action') . ' WHERE %s AND type = ' . $actionType . ' )'; switch ($matchType) { case '=@': |