Subject | Re: [firebird-support] Strange timestamp math w/ FB 2.5 |
---|---|
Author | Ismael L. Donis GarcĂa |
Post date | 2010-10-20T17:21:31Z |
Try substituting CAST('NOW' AS TIMESTAMP) for CURRENT_TIMESTAMP
DECLARE VARIABLE STRT TIMESTAMP;
...
STRT=CURRENT_TIMESTAMP;
/* runs for 16.703 seconds */
UPDATE PERF_TRACE p SET p.DURATION = p.DURATION + (CURRENT_TIMESTAMP - :STRT) WHERE p.PROC='TEST';
Regards
=========
|| ISMAEL ||
=========
DECLARE VARIABLE STRT TIMESTAMP;
...
STRT=CURRENT_TIMESTAMP;
/* runs for 16.703 seconds */
UPDATE PERF_TRACE p SET p.DURATION = p.DURATION + (CURRENT_TIMESTAMP - :STRT) WHERE p.PROC='TEST';
Regards
=========
|| ISMAEL ||
=========
----- Original Message -----
From: Rick Debay
To: firebird-support@yahoogroups.com
Sent: Wednesday, October 20, 2010 12:12 PM
Subject: [firebird-support] Strange timestamp math w/ FB 2.5
I'm trying to do performance tracing and I'm getting strange numbers. A
stored procedure that runs for over sixteen seconds is being logged as
running for 0.0002 seconds.
Does anyone have any ideas as to what I could be doing wrong?
CREATE TABLE PERF_TRACE
(
PROC VARCHAR(32) NOT NULL,
DURATION DECIMAL(18,4) NOT NULL,
CONSTRAINT PK_PERF_TRACE PRIMARY KEY (PROC)
);
PROC DURATION
--------------
TEST 0.0000
DECLARE VARIABLE STRT TIMESTAMP;
...
STRT=CAST('NOW' AS TIMESTAMP);
/* runs for 16.703 seconds */
UPDATE PERF_TRACE p SET p.DURATION = p.DURATION + (CAST('NOW' AS
TIMESTAMP) - :STRT) WHERE p.PROC='TEST';
PROC DURATION
--------------
TEST 0.0002
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.
[Non-text portions of this message have been removed]