MySQL Forums
Forum List  »  Performance

Re: combined index ignored
Posted by: Daniel Blackhurst
Date: January 23, 2010 03:40PM

Sorry I sent you some of the things you asked for off the live and some off my local. I have added the index (vehicle_id,id) although it won't use it for some reason. Should have used the correct create statement sorry. If you see the EXPLAIN that shows the query on my local copy that is of allot smaller size. Takes too long to add indexes on the live without testing fully.

I didn't know that indexes contained the primary key also in innodb. Do you know any references where I could look at that in more detail?

The machine is 64bit. Do you think the small buffer pool size in comparison to the db size could be the culprit for this query running really slow occasionally?

Thanks for the advise about the columns. Data is archived and deleted from the database over 3 months as its very rarely needed. I think key rotation might be an idea for the large primary key.

Any ideas on how to force MYSQL to use that key? Even if I remove the vehicle_id,date_time index it then chooses the PRIMARY KEY.

Cheers,

Dan

Options: ReplyQuote


Subject
Views
Written By
Posted
3343
January 21, 2010 04:02PM
1508
January 22, 2010 09:47PM
1478
January 23, 2010 04:49AM
1533
January 23, 2010 01:23PM
Re: combined index ignored
1487
January 23, 2010 03:40PM
1690
January 24, 2010 01:05AM
1426
January 24, 2010 07:29AM
1522
January 24, 2010 03:40PM
1376
February 02, 2010 09:09AM


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.