Subject RE: [firebird-support] CURRENT_TIMESTAMP vs. NOW
Author Rick Debay
These two columns are defined in the table with a default of
CURRENT_TIMESTAMP and NOW.
Does it seem strange that an insert statement would take between 14 and
17 seconds? It is an external table, but the database is relatively
idle.

CURRENT_TS NOW_TS
------------------
1/26/2007 4:18:17 PM 1/26/2007 4:18:31 PM
1/29/2007 10:51:53 AM 1/29/2007 10:52:10 AM

-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Ann W. Harrison
Sent: Tuesday, January 30, 2007 10:59 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] CURRENT_TIMESTAMP vs. NOW

Rick Debay wrote:
> I notice that NOW is usually later than CURRENT_TIMESTAMP. I believe
> this has to do with transactions, but I'd like an explanation.
>

NOW is the time at the instant it is evaluated. CURRENT_TIMESTAMP is
fixed for the duration of a statement. In other words, if you were to
update every record in a large table, setting TIME_MODIFIED to NOW,
you'd see several different times. CURRENT_TIMESTAMP, on the other
hand, would set the TIME_MODIFIED to the same value.

Regards,


Ann

Disclaimer: This message (including attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. RxStrategies, Inc. shall not be liable for the improper or incomplete transmission of the information contained in this communication or for any delay in its receipt or damage to your system. RxStrategies, Inc. does not guarantee that the integrity of this communication has been maintained nor that this communication is free from viruses, interceptions or interference.