jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/396121 )
Change subject: Improve query plan for getListsByPage ...................................................................... Improve query plan for getListsByPage Bug: T182053 Change-Id: I62c7d73ce7f30a4cfaa3ecb0fb11b9197657b9bc (cherry picked from commit 1a737fe40cd4f6cc82545a1fd6221a0287a09abe) --- M src/ReadingListRepository.php 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/src/ReadingListRepository.php b/src/ReadingListRepository.php index edcac9d..fe1d315 100644 --- a/src/ReadingListRepository.php +++ b/src/ReadingListRepository.php @@ -694,10 +694,14 @@ $conditions, __METHOD__, [ - 'GROUP BY' => $this->getListFields(), + // Grouping by rle_rl_id can be done efficiently with the same index used for + // the conditions. All other fields are functionally dependent on it; MySQL 5.7.5+ + // can detect that ( https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html ); + // MariaDB needs the other fields for ONLY_FULL_GROUP_BY compliance, but they don't + // seem to negatively affect the query plan. + 'GROUP BY' => array_merge( [ 'rle_rl_id' ], $this->getListFields() ), 'ORDER BY' => 'rle_rl_id ASC', 'LIMIT' => (int)$limit, - ] ); -- To view, visit https://gerrit.wikimedia.org/r/396121 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I62c7d73ce7f30a4cfaa3ecb0fb11b9197657b9bc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ReadingLists Gerrit-Branch: wmf/1.31.0-wmf.11 Gerrit-Owner: Gergő Tisza <gti...@wikimedia.org> Gerrit-Reviewer: Gergő Tisza <gti...@wikimedia.org> Gerrit-Reviewer: Mholloway <mhollo...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits