我遇到了一个简单的问题,即找出哪些查询比平时需要更多的时间才能完成。我的脚本如下:
locking row for access
SELECT
username,
CollectTimeStamp,
((firstresptime - starttime ) HOUR TO second ) AS ElapsedTime,
((firstresptime - firststeptime ) HOUR TO second ) AS ExecutionTime,
CAST(((firstresptime - firststeptime) SECOND) AS INTEGER) AS ExecutionTimeInt,
(ElapsedTime - ExecutionTime) AS Delay,
-- other kpis here
FROM dbql_data.dbql_all
where username ='MyUser';
and dateofday> '2017-07-01'
and ExecutionTimeInt > 5
但是,我得到的记录ExecutionTimeInt
少于 5。
问题:如何获取时间间隔大于某个值的记录?
额外信息:
select * from dbc.dbcinfo;
返回
InfoKey InfoData
1 VERSION 15.10.04.10
2 RELEASE 15.10.04.02
3 LANGUAGE SUPPORT MODE Standard