Home » Performance » MySQL » SQL_CALC_FOUND_ROWS
SQL_CALC_FOUND_ROWS [message #157] Mon, 11 September 2006 10:23 Go to next message
sbazemore  is currently offline sbazemore
Messages: 4
Registered: August 2006
Location: Charlotte, North Carolina
Junior Member
I use SQL_CALC_FOUND_ROWS on some of my queries to create my paging for my site. It has worked fine for a few months and all of a sudden it quit working.

It doesn't matter how simple the query it alway's returns 1.

I have a table with ~(40,000) rows and I run a query like:

SELECT SQL_CALC_FOUND_ROWS media_id FROM media ORDER BY media_id DESC LIMIT 0, 15;

SELECT FOUND_ROWS(); returns 1.

Nothing has changed in the code, and even running this through MySQL command line returns the same result.

Any suggestion?
Re: SQL_CALC_FOUND_ROWS [message #158 is a reply to message #157 ] Mon, 11 September 2006 10:34 Go to previous message
Peter  is currently offline Peter
Messages: 405
Registered: August 2006
Senior Member
Super Guru
Does MySQL Command line client returns right result or wrong result ?

Did you upgrade MySQL Server recently ?

If you can repeat such behavior using Command line client you may run into the bug which ether starts to happen with Server upgrade or just due to your data changes. In this case it is best to open the bug at bugs.mysql.com


Peter Zaitsev, MySQL Performance Expert
MySQL Performance Blog - http://www.mysqlperformanceblog.com
MySQL Consulting http://www.mysqlperformanceblog.com/mysql-consulting/
Previous Topic:InnoDB and COUNT(*)
Next Topic:Mysql memory and server overload
Goto Forum:
  


Current Time: Fri Jul 10 01:41:34 EDT 2009

Total time taken to generate the page: 0.02419 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.