When debugging someone code I found that one of the queries was causing the temp table of mysql to run out of memory. I found that the query was executing even though the ‘ON’ condition did not have an equals to match the fields. I was wondering…
What this would actually do as this seemed to cause a horrendous performance lag?
(I ran the explain command which didn’t seem to help)
As a very rudimentary example it would look something like this query:
"SELECT testfield
FROM foo f
LEFT JOIN bar b ON b.testid
WHERE testid = 40365";
this is because you’re joining on condition TRUE, which means this operation is a bit like a cartesian product.
I guess your tables are big enough to cause this memory problem.