Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Sergio Peres asked how to read the time fields of syssqltrace in seconds. Art Kagel explained that sql_runtime, sql_lockwttime, sql_totaltime, sql_avgtime and sql_maxtime are fractional elapsed seconds, sql_finishtime is a Unix epoch convertible with dbinfo('utc_to_datetime'), and sql_begintxtime is an internal transaction time. Sergio confirmed this answered his question.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Sergio Peres — source: IBM Community (ConnectedCommunity.org) Informix forum
Hi,
Over syssqltrace table there are some fields about time execution and others, how can I get this values in seconds?
Thanks for any help.
Best regards,
SP
------------------------------
Sergio Peres
AIRC
Coimbra
------------------------------
#Informix
↪ replying to Sergio Peres
Eric Vercelletto — source: IBM Community (ConnectedCommunity.org) Informix forum
dSergio,
depending on which columns you are talking about, but AFAIK these columns are expressed in seconds.xxxxx
(5 digits after decimal point)
Some other columns are expressed in UTC, but they are not durations, the are timestamps. Use the dbinfo(utc_to_datetime, value) to convert to a timestamp
Is this what you need?
Eric Vercelletto
Data Management Architect and Owner / Begooden IT Consulting
KandooERP Founder and Community Manager
IBM Champion 2013,2014,2015,2016,2017,2018,2019,2020
Tel: +33(0) 298 51 3210
Mob : +33(0)626 52 50 68
skype: begooden-it
Google Hangout:
eric.vercelletto@begooden-it.com
Email:
eric.vercelletto@begooden-it.com
www :
http://www.vercelletto.com
www
https://kandooerp.org
↪ replying to Eric Vercelletto
Sergio Peres — source: IBM Community (ConnectedCommunity.org) Informix forum
Thanks for reply Eric,
my doubt is whether the value that appears at sql_runtime is already in seconds or is necessary to convert.
Cumprimentos,
SP
------------------------------
Sergio Peres
AIRC
Coimbra
------------------------------
↪ replying to Sergio Peres
Art Kagel — source: IBM Community (ConnectedCommunity.org) Informix forum
Sergio:
Of the "time" columns in syssqltrace, the sql_begintxtime is the internal transaction "time" and not related to a clock time or eleased time.
The colunm sql_finishtime contains the UNIX Epoch in seconds which you can convert to a time with dbinfo('utc_to_datetime', sql_finishtime).
The columns sql_runtime , sql_lockwttime, sql_totaltime , sql_avgtime, sql_maxtime contain fractional elapsed seconds for the query for run time, lock wait time, average run time (when a query has multiple executions), and maximum runtime (when a query has multiple executions) respectively.
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
↪ replying to Art Kagel
Sergio Peres — source: IBM Community (ConnectedCommunity.org) Informix forum
Thanks for the information Art,
My doubt was exactly what kind of values are on those fields.
Best regards,
SP
------------------------------
Sergio Peres
AIRC
Coimbra
------------------------------
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.