MySQL Forums
Forum List  »  InnoDB

sub optimal query plan
Posted by: Vishal Vishal
Date: January 13, 2016 01:45PM

I am using mysql 5.5 with innodb. I ran into an issue where one particular query suddenly started using sub optimal query plan. Prior to this, the query was working fine with a response time of 1 second or so. But suddenly mysql started using a different query plan with a different index which was least selective resulting in a response time of 200+ secs. Can somebody explain why this would happen? When I ran the same query with an index hint of the correct index, all the subsequent runs of the query started using the new query plan.

Can somebody please provide some explanation to the root cause of this issue? One possible thing I can think of is the table statistics would be out of date but I don't the underlying table data changed so drastically that it would completely change the query plan and use a new index

Options: ReplyQuote


Subject
Views
Written By
Posted
sub optimal query plan
1611
January 13, 2016 01:45PM
772
January 13, 2016 02:45PM
776
January 13, 2016 05:39PM


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.