John Fawcett wrote:
Simon
I doubt that splitting the queries will change whether an index is used.
The potential index on mailbox_idnr is not a good one when there are
many rows corresponding to mailbox_idnr.
Did you try to explain the separated queries? The behaviour should be
the same as in the combined select.
John
John,
It doesn't actually use the mailbox_idnr key (at least not in my
environment) it is using the mailbox_status instead. I think the problem
relies within mysql rather than dbmail here, mysql will internally use
its temptable algorithm on unions like this.
http://bugs.mysql.com/bug.php?id=29244
You are correct, the behaviour is the same on each individual query
except the union result part.
Simon
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev