ou may need to try setting certain variables within your session
These particular values may be too small for your DB Connection to fulfill the query efficiently. These can be set within as follows:
- To see what values these settings have currently do the following:
SHOW VARIABLES LIKE 'max_heap_table_size';
SHOW VARIABLES LIKE 'tmp_table_size';
- To set max_heap_table_size to 64M do the following:
SET max_heap_table_size = 1024 * 1024 * 64;
- To set tmp_table_size to 32M do the following:
SET tmp_table_size = 1024 * 1024 * 32;
Please consult the MySQL Documentation on Temp Table Usage
If you cannot set these values within your own session, contact your hosting provider to dynamically set them in your my.cnf.
Give it a Try !!!