MySQL Forums
Forum List  »  Newbie

Re: Help with Index
Posted by: Rick James
Date: August 03, 2016 03:08PM

Peter, the '=' values need to be first; the range last:

index(source, value, ns, eventid)

objectid does not seem to need to be in the index. If it was for 'covering', then it comes even after the one range.

events needs INDEX(objectid, value, clock)

Yes, remove the LIMIT 1:
( SELECT MIN(...) FROM ... WHERE ... )

Triggers needs INDEX(triggerid, status) unless triggerid is already the PRIMARY KEY.

Options: ReplyQuote


Subject
Written By
Posted
August 02, 2016 08:52AM
August 03, 2016 08:03AM
August 03, 2016 10:24AM
August 03, 2016 01:18PM
Re: Help with Index
August 03, 2016 03:08PM
August 05, 2016 08:08AM
August 08, 2016 08:59AM


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.