[development] Good article on MEMORY temp tables in MySQL

Gerhard Killesreiter gerhard at killesreiter.de
Sat Aug 18 09:36:01 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Douglass schrieb:
> For those of you who like reading performance tuning stuff:
> http://www.mysqlperformanceblog.com/2007/08/16/how-much-overhead-is-caused-by-on-disk-temporary-tables/
> 
> 
> This could be particularly relevant to Drupal.org if we are still
> getting temp tables written to disk. It turns out that even when we
> specify MEMORY for temp tables, MySQL still has the option of writing to
> disk if other buffers aren't large enough.

You wouldn't believe the amazing mySQL bugs Narayan has discovered in
that area. ;(

"BLOB/TEXT columns are not supported with MEMORY storage engine so must
use on disk MyISAM temporary table."

There are a number of queries that could be improved to not use e.g. the
teaser. I think it would be better if the query would first get the nids
in the requested order and then in a second step get the needed teasers.

Of course, the /tmp partition mySQL writes to is mapped to memory, so
the difference between in memory and on disk shouldn't be that large.

In other news: A new slow query log is available on the infra list.

Cheers,
	Gerhard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGxr2Bfg6TFvELooQRAhrrAKCVMDYOGxeXqrdu4V/Mdl8vomHxzACdFizN
3uUicxEdax28Ri+1SDD4iE4=
=4Xpl
-----END PGP SIGNATURE-----


More information about the development mailing list