зеркало из https://github.com/mozilla/pjs.git
got rid of the "group by" restraint, halfing the query time :)
This commit is contained in:
Родитель
97386bb810
Коммит
81263a1e0c
|
@ -88,7 +88,7 @@ class Result extends AppModel {
|
||||||
// SQL_CALC_FOUND_ROWS used for counting comments
|
// SQL_CALC_FOUND_ROWS used for counting comments
|
||||||
$_query = "
|
$_query = "
|
||||||
SELECT
|
SELECT
|
||||||
SQL_CALC_FOUND_ROWS
|
SQL_CALC_FOUND_ROWS DISTINCT
|
||||||
`Result`.`id`,
|
`Result`.`id`,
|
||||||
`Result`.`comments`,
|
`Result`.`comments`,
|
||||||
`Result`.`created`
|
`Result`.`created`
|
||||||
|
@ -105,7 +105,6 @@ class Result extends AppModel {
|
||||||
collection_id={$_collection_id['Collection']['id']}
|
collection_id={$_collection_id['Collection']['id']}
|
||||||
AND
|
AND
|
||||||
Result.application_id={$_application_id}
|
Result.application_id={$_application_id}
|
||||||
GROUP BY Result.comments
|
|
||||||
";
|
";
|
||||||
|
|
||||||
$_start =($pagination['page'] -1) * $pagination['show'];
|
$_start =($pagination['page'] -1) * $pagination['show'];
|
||||||
|
|
Загрузка…
Ссылка в новой задаче