On Tue, Jun 1, 2010 at 8:40 AM, John G. Heim <jheim@stripped> wrote:
> On my db server, mysql has 2 gigabytes for temporary tables and yet its
> creating 99% of temporary tables on disk.
> According to mysqltuner, 99% of temporary tables are created on disk.
"Instances of BLOB or TEXT columns in the result of a query that is
processed using a temporary table causes the server to use a table on
disk rather than in memory because the MEMORY storage engine does not
support those data types (see Section 7.5.10, “How MySQL Uses Internal
Temporary Tables”). Use of disk incurs a performance penalty, so
include BLOB or TEXT columns in the query result only if they are
really needed. For example, avoid using SELECT *, which selects all
If you can get us a query, explain, and table/index info we may be
able to help you more.
Also, you might want to consider creating a ram disk so that filesorts
that must be done on disk might be done inexpensively.