[TYPO3-dev] Tip: use SQL function COUNT(*)

Dmitry Dulepov [typo3] dmitry at typo3.org
Sun Jul 20 13:51:00 CEST 2008


Hi!

Steffen Kamper wrote:
> i tested this and it makes no difference
> COUNT(*) or COUNT(field) is internally the same

There is a difference if you use different storage engines. MyISAM works best with COUNT(*) because it stores counter separately. But COUNT(uid) will not use this counter but count all uids using index. At least it worked this way in MySQL 4.

-- 
Dmitry Dulepov
TYPO3 Core team
More about TYPO3: http://typo3bloke.net/
Subscribe: http://typo3bloke.net/rss.xml
Latest article: http://typo3bloke.net/post-details/nominate_me_as_typo3_mvp/




More information about the TYPO3-dev mailing list