[TYPO3-core] RFC: Feature Request #10091: Integrate TYPO3_DB->exec_SELECTcountRows()

Martin Kutschker masi-no at spam-typo3.org
Sat Jan 10 16:17:28 CET 2009


Steffen Kamper schrieb:
> 
> On additional: It may be faster if using MySQL native counter
> SELECT SQL_CALC_FOUND_ROWS * FROM ...
> What do you think?

I wonder why this should be faster? Using * makes the result set larger
(more columns per row) and you need another query ("SELECT
FOUND_ROWS()") to retrieve the number.

Or do you intend to do this:

SELECT SQL_CALC_FOUND_ROWS * FROM table LIMIT 1
SELECT FOUND_ROWS()

Nah, doesn't sound convincing.

Masi

PS: I haven't filed a bug yet, but I noticed that Ingo uses a "TRUNCATE
table" in the caching framework. DBAL broken again :( If we really want
to use TRUNCATE we should create a t3lib_db->clearTable() function (or
emptyTable).


More information about the TYPO3-team-core mailing list