On 8/1/07, Les Fletcher <[EMAIL PROTECTED]> wrote:
> SQL_CALC_FOUND_ROWS isn't an option for us.  Right now I am doing two
> queries, but I am just trying to see if there is a better way to do the
> count query than to just turn it into a dervied table and count the
> results i.e. SELECT COUNT(*) FROM (big nasty query) t1.

I don't think so.  That's the way I've done it.  You may want to
experiment with changing the SELECT on the inside query to minimize
the amount of data that gets put into the temp table.  I don't know if
the optimizer is smart enough to skip fetching those values or not.

- Perrin

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to