MySQL Forums
Forum List  »  Optimizer & Parser

Re: Advice on indexing a datetime column
Posted by: Jonathon Coombes
Date: July 24, 2010 09:58PM

Adding an index will add some overhead in terms of inserting/updating records. So if you are doing things like archiving or lots of updating, it may be a decrease in performance, depending on your application.

In terms of indexing the datetime column, this will offer benefit only if the queries are constructed to utilise that index. For example, if you are looking at getting data back for certain days, then this query may make lots of sense. However, if you are getting it over large amounts of time, or not time related, then MySQL may not even use the index.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Advice on indexing a datetime column
11599
July 24, 2010 09:58PM


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.