MySQL Forums
Forum List  »  Performance

DATETIME vs. TIMESTAMP
Posted by: dbv
Date: April 04, 2005 04:08PM

The MySQL guides state that it's more efficient to use default values when possible, than to manually add this data in.

Does this apply to a TIMESTAMP field as well? For example, which is faster:

"UPDATE table SET ipaddr = '$ipaddr', curtime = NOW() WHERE id = const" (curtime -> DATETIME)

"UPDATE table SET ipaddr = '$ipaddr' WHERE id = const" (curtime -> TIMESTAMP)

If I'm going to be doing this request fairly often would it be quicker to use TIMESTAMP? Thanks.

Options: ReplyQuote


Subject
Views
Written By
Posted
DATETIME vs. TIMESTAMP
5213
dbv
April 04, 2005 04:08PM
2632
April 05, 2005 09:53PM


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.