在Informix数据库中,查找长时间运行的查询可以通过以下方法进行:
dbaccess
工具连接到Informix数据库,并执行以下SQL语句:SELECT
session_id,
start_time,
command,
query_text
FROM
sysadmin:sessions
WHERE
command = 'SELECT'
AND query_state = 'ACTIVE'
AND start_time < (CURRENT - INTERVAL(10 MINUTE))
ORDER BY
start_time DESC;
这个查询将返回所有长时间运行的SELECT查询,包括会话ID、开始时间、命令和查询文本。
dbaccess
工具连接到Informix数据库,并执行以下SQL语句:SELECT
session_id,
start_time,
command,
query_text
FROM
sysadmin:sessions
WHERE
command = 'SELECT'
AND query_state = 'ACTIVE'
AND start_time < (CURRENT - INTERVAL(10 MINUTE))
ORDER BY
start_time DESC;
这个查询将返回所有长时间运行的SELECT查询,包括会话ID、开始时间、命令和查询文本。
dbaccess
工具连接到Informix数据库,并执行以下SQL语句:SELECT
session_id,
start_time,
command,
query_text
FROM
sysadmin:sessions
WHERE
command = 'SELECT'
AND query_state = 'ACTIVE'
AND start_time < (CURRENT - INTERVAL(10 MINUTE))
ORDER BY
start_time DESC;
这个查询将返回所有长时间运行的SELECT查询,包括会话ID、开始时间、命令和查询文本。
dbaccess
工具连接到Informix数据库,并执行以下SQL语句:SELECT
session_id,
start_time,
command,
query_text
FROM
sysadmin:sessions
WHERE
command = 'SELECT'
AND query_state = 'ACTIVE'
AND start_time < (CURRENT - INTERVAL(10 MINUTE))
ORDER BY
start_time DESC;
这个查询将返回所有长时间运行的SELECT查询,包括会话ID、开始时间、命令和查询文本。
dbaccess
工具连接到Informix数据库,并执行以下SQL语句:SELECT
session_id,
start_time,
command,
query_text
FROM
sysadmin:sessions
WHERE
command = 'SELECT'
AND query_state = 'ACTIVE'
AND start_time < (CURRENT - INTERVAL(10 MINUTE))
ORDER BY
start_time DESC;
这个查询将返回所有长时间运行的SELECT查询,包括会话ID、开始时间、命令和查询文本。
dbaccess
工具连接到Informix数据库,并执行以下SQL语句:SELECT
session_id,
start_time,
command,
query_text
FROM
sysadmin:sessions
WHERE
command = 'SELECT'
AND query_state = 'ACTIVE'
AND start_time < (CURRENT - INTERVAL(10 MINUTE))
ORDER BY
start_time DESC;
这个查询将返回所有长时间运行的SELECT查询,包括会话ID、开始时间、命令和查询文本。
dbaccess
工具连接到Informix数据库,并执行以下SQL语句:SELECT
session_id,
start_time,
command,
query_text
FROM
sysadmin:sessions
WHERE
command = 'SELECT'
AND query_state = 'ACTIVE'
AND start_time < (CURRENT - INTERVAL(10 MINUTE))
ORDER BY
start_time DESC;
这个查询将返回所有长时间运行的SELECT查询,包括会话ID、开始时间、命令和查询文本。
dbaccess
工具连接到Informix数据库,并执行以下SQL语句:SELECT
session_id,
start_time,
command,
query_text
FROM
sysadmin:sessions
WHERE
command = 'SELECT'
AND query_state = 'ACTIVE'
AND start_time < (CURRENT - INTERVAL(10 MINUTE))
ORDER BY
start_time DESC;
这个查询将返回所有长时间运行的SELECT查询,包括会话ID、开始时间、命令和查询文本。
dbaccess
工具连接到Informix数据库,并执行以下SQL语句:SELECT
session_id,
start_time,
command,
query_text
FROM
sysadmin:sessions
WHERE
command = 'SELECT'
AND query_state = 'ACTIVE'
AND start_time < (CURRENT - INTERVAL(10 MINUTE))
ORDER BY
start_time DESC;
这个查询将
领取专属 10元无门槛券
手把手带您无忧上云