MySQL Forums
Forum List  »  Optimizer & Parser

Re: Why not use index
Posted by: zhang peng
Date: November 11, 2015 07:29PM

This is my sql:
SELECT
*
FROM
crm_order_manual_detail_t AS d,
crm_order_manual_t AS m
LEFT JOIN crm_order_t crm ON m.wp_order_id = crm.source_order_id
OR m.source_order_id = crm.source_order_id
WHERE
d.wp_order_id = m.wp_order_id

Explain result:
1 SIMPLE d ALL PRIMARY 63
1 SIMPLE m eq_ref PRIMARY PRIMARY 62 db_purchase_dev.d.wp_order_id 1
1 SIMPLE crm ALL ix_crm_order_t_source_order_id 86001 Range checked for each record (index map: 0x8)

m.wp_order_id is primary key,crm.source_order_id and m.source_order_id have index

Options: ReplyQuote


Subject
Views
Written By
Posted
1695
November 08, 2015 11:14PM
858
November 09, 2015 11:42AM
868
November 11, 2015 12:17AM
901
November 10, 2015 10:35AM
1053
November 11, 2015 12:15AM
942
November 11, 2015 03:40AM
Re: Why not use index
1197
November 11, 2015 07:29PM
836
November 11, 2015 11:00PM
930
November 12, 2015 01:48AM
898
November 16, 2015 12:17AM


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.