3 ms·
if things are slow, check EXPLAIN first.
by akronim 15y ago
if things are slow, check EXPLAIN first.
- robryan 15y agoWhich strangely seemed to be one of the last things this guy did, mysql explain and profile are usually enough to see what is going on.
- barefoot 15y agoGood advice. "Explain" in this case wouldn't be enough to work out what's going on, however. In both the TEXT and VARCHAR cases he expected the queries to be using temporary tables so the output from mysql explain (both showing the use of temporary tables but not the storage medium such as disk or memory) would not have helped.
- rapind 15y agoPlus I kind of enjoyed the round about way he explained it.
- megaman821 15y agoEXPLAIN provides a bit of the clue but the meat of the problem is that the VARCHAR is being changed to a CHAR. EXPLAIN is just verifies that something is going on to force a temp table to be created.