joomla/joomla-cms — pull request #1274 by mahagr (2013-06-13 12:55:40+00:00)
Title:  Improve JModelLegacy::_getListCount() performance on JDatabaseQuery objects

Joomla currently uses unlimited query together with $db->getNumRows() to return total count. Unfortunately it has major performance penalty on large datasets, making queries very slow as @beat demonstrated in JAB13.

This pull request automatically optimizes all getListCount() calls to use COUNT(*) as long as JDatabaseQuery objects are used.