Joe Wilson wrote:

"EXPLAIN SELECT ..." is also a good way to find out what the queries are doing
if you're prepared to decipher the opcodes.


Joe,

I had looked at the explain output and it wasn't clear which would be faster. The count method produces less VDBE code but involves calls to the count functions (step and final). The exists tests are done by setting and testing integer variables in the VDBE code even though the code is somewhat longer. Hence my recommendation to test both.

Still, examining the explain output is generally good advice whenever you are optimizing your SQL.

Dennis Cote


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to