Gergő Tisza has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395885 )
Change subject: Improve query plan for getListsByPage ...................................................................... Improve query plan for getListsByPage Bug: T182053 Change-Id: I62c7d73ce7f30a4cfaa3ecb0fb11b9197657b9bc --- M src/ReadingListRepository.php 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ReadingLists refs/changes/85/395885/1 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/395885 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I62c7d73ce7f30a4cfaa3ecb0fb11b9197657b9bc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ReadingLists Gerrit-Branch: master Gerrit-Owner: Gergő Tisza <gti...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits