MySQL Forums
Forum List  »  Optimizer & Parser

Re: how to optimize this sql?
Posted by: h h
Date: July 12, 2016 09:08PM

root@localhost:legend 11:00:26>select count(distinct(is_deleted)) from legend_account_coupon\G
*************************** 1. row ***************************
count(distinct(is_deleted)): 2
1 row in set (0.19 sec)

root@localhost:legend 11:02:16>select count(distinct(shop_id)) from legend_account_coupon\G
*************************** 1. row ***************************
count(distinct(shop_id)): 289
1 row in set (0.26 sec)

shop_id ,is_deleted column has not very much different value,actually there are very loooooong list in IN clause

Options: ReplyQuote


Subject
Views
Written By
Posted
1441
h h
July 07, 2016 07:38PM
1022
July 08, 2016 10:59AM
997
h h
July 12, 2016 09:01PM
902
July 09, 2016 11:04PM
Re: how to optimize this sql?
901
h h
July 12, 2016 09:08PM
847
July 14, 2016 12:52PM


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.