distal-attribute
distal-attribute
distal-attribute
distal-attribute

SQL_CALC_FOUND_ROWS

andyr posted 10 years ago in General
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 posted 10 years ago
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 posted 10 years ago

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.
andyr posted 10 years ago
Brilliant happyThanks

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