MySQL Forums
Forum List  »  Performance

Re: Puzzled: why does join run 27,252 x faster than left outer join?
Posted by: Daniel Brennan
Date: July 19, 2005 07:38AM

No Problem:

mysql> explain select sum(b.amount)*-1
-> from lockbox a join ledger b
-> on a.payid = b.tranid
-> or a.secid = b.tranid
-> or a.petid = b.tranid\G;
*************************** 1. row ***************************
table: a
type: ALL
possible_keys: ipayid,isecid,ipetid
key: NULL
key_len: NULL
ref: NULL
rows: 620
Extra:
*************************** 2. row ***************************
table: b
type: ALL
possible_keys: PRIMARY
key: NULL
key_len: NULL
ref: NULL
rows: 183183
Extra: Range checked for each record (index map: 1)
2 rows in set (0.00 sec)

mysql> explain select sum(b.amount)*-1
-> from lockbox a left outer join ledger b
-> on a.payid = b.tranid
-> or a.secid = b.tranid
-> or a.petid = b.tranid\G;
*************************** 1. row ***************************
table: a
type: ALL
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: 620
Extra:
*************************** 2. row ***************************
table: b
type: ALL
possible_keys: PRIMARY
key: NULL
key_len: NULL
ref: NULL
rows: 183183
Extra:
2 rows in set (0.00 sec)

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Puzzled: why does join run 27,252 x faster than left outer join?
1616
July 19, 2005 07:38AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.