Re: my paging task with PHP does not work. It uses cookie.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2007. 09. 14, péntek keltezéssel 10.50-kor mike ezt írta:
> except i think innodb does not have a full row count stored.

of course not, but SQL_CALC_FOUND_ROWS does not use that. it is working
like it selects the rows and counts them. and in the case of complex
queries (where you use more than one table) you could not make use of
that stored value anyway.

greets
Zoltán Németh

> 
> anyway the design was meant for a simple one function call. it's
> worked great for small and data loads.
> 
> On 9/14/07, Arvids Godjuks <arvids.godjuks@xxxxxxxxx> wrote:
> > Don't use SQL_CALC_FOUND ROWS on simple queries, when you have to run a
> > simple query on one or two (with join) tables with a simple WHERE. Especialy
> > if tables are big. I found out that single SELECT COUNT(id) FROM table is
> > far more faster when query has simple WHERE conditions. I use
> > SQL_CALC_FOUND_ROWS only with a rather complex queries - that
> > SQL_CALC_FOUND_ROWS doesn't affect query execution at all (well, it affects
> > ofcourse, but affect is so small, you can't see it).
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux