MySQL Forums
Forum List  »  Performance

Re: long running, can't get to use index
Posted by: Benoit St-Jean
Date: May 06, 2017 07:36PM

Hi Eric,

A few questions.

1) Can you post the EXPLAIN for this query
2) Do you always have 2 r_userid in your query or it could be more/less (i.e. "r_userid IN ( 1, 200 )"
3) I noticed that r_type is a string. Could you use an INT instead?
4) Have you tried partitionning?
Before re-designing your tables, show us the EXPLAIN. I'm pretty sure there's a way to make this fast!
5) Can you provide numbers on selectivity for r_userid, r_status and r_type?

SELECT COUNT(DISTINCT columnname) AS distinctvalues
FROM yourtablename



Thank you!

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: long running, can't get to use index
43
May 06, 2017 07:36PM


Sorry, only registered users may post in this forum.

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.