MySQL Forums
Forum List  »  Performance

Re: 1 long query stuck all other queries
Posted by: Rick James
Date: September 16, 2012 10:49PM

Please provide
EXPLAIN SELECT MIN(ID) FROM table.name WHERE DateTime<"";

Are you really comparing against the empty string?

Please provide SHOW CREATE TABLE `name`;

Is ID the PRIMARY KEY?

What is the value of this?
SELECT COUNT(*) FROM table.name WHERE DateTime<"";
If the answer is 0, then we are barking up a different tree, Jorgen -- Empty set sometimes leads to unnecessary table scan.

Options: ReplyQuote


Subject
Views
Written By
Posted
2404
September 12, 2012 02:23AM
761
September 16, 2012 09:05PM
Re: 1 long query stuck all other queries
838
September 16, 2012 10:49PM
809
September 17, 2012 12:48AM
806
September 17, 2012 08:55AM
866
September 14, 2012 01:43AM
822
September 14, 2012 10:36PM


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.