SQL_CALC_FOUND_ROWS

[expired user #1767]'s profile image [expired user #1767] posted 17 years ago in General Permalink
First of all, good to see the 'proper' mysqlfront making a come backsmileMust be the easiest of the mysql clients to use and I've been through a few!

I have an issue with the SQL_CALC_FOUND_ROWS usage. We have some tables with over 6 million rows. When browsing the data to filter, the initial load of the data takes a v. long time due to the

SELECT SQL_CALC_FOUND_ROWS * FROM statistics LIMIT 0, 50

Would it be possible to use a count(*) when initially browsing to the table (before any filters applied) as this would be v. quick when using MyISAM tables?

Or, would it be possible to turn off SQL_CALC_FOUND_ROWS somehow? Or use the Rows column from 'show tables status' to determine whether to use sql_calc_found_rows if smaller than a certain limit?
ansgar's profile image ansgar posted 17 years ago Permalink
Good idea: Disable the SQL_CALC_FOUND_ROWS for the benefit of a COUNT(), as long as no filter was applied. Not sure if that gets into the 3.0 final.
ansgar's profile image ansgar posted 17 years ago Permalink

Would it be possible to use a count(*) when initially browsing to the table (before any filters applied) as this would be v. quick when using MyISAM tables?



Done in revision 543.
[expired user #1767]'s profile image [expired user #1767] posted 17 years ago Permalink
Brilliant happyThanks

Please login to leave a reply, or register at first.