[TYPO3-mvc] RFC #12213: Repository countAll() dosn't honor sys_language_uid

Franz Koch typo3.RemoveForMessage at elements-net.de
Fri Jan 14 14:08:37 CET 2011


Hey,

> i thought so, but can't find it. Maybe Sebastian could remember or tell
> us. He seems to be the author of the class.

I can tell you the reason -> performance. Your current solution would 
fetch ALL objects from DB, perform the overlays etc and after that 
perform a simple count. This is way to much overhead and could in the 
worst case lead to memory_issues having to fetch thousands of objects 
only to perform a simple count. So there has to be a different/better 
solution for this.


The splitted count queries where also created because of performance. In 
general, sql_num_rows would be fine, but is slower then COUNT(*). But 
sql_num_rows is needed for queries already having a LIMIT applied, 
because COUNT doesn't work with a LIMIT or simply ignores it.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list