MySQL Forums
Forum List  »  Optimizer & Parser

Re: datetime vs date,time
Posted by: Jonathan Webb
Date: May 17, 2007 05:07AM

Interesting. I too use date & time alot in my db. How do you use these fields? I have to analyse records using date and then again with time, so i made one column datetime - i assumed it would be better...
Eg: (readable code)
update sometable set somecolumn='weekend' if date(datetime) in (1,7)
update sometable set somecolumn='meeting' if time(datetime) between 0900 & 0930
Do you think this would be faster using two columns?
(i actually combined the two statements in one)

Options: ReplyQuote


Subject
Views
Written By
Posted
9128
May 16, 2007 02:31AM
Re: datetime vs date,time
3575
May 17, 2007 05:07AM
3093
May 17, 2007 06:08AM
2987
May 17, 2007 10:08AM


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.