Identifying Sequential Scan SQL
Posted in 2008
Topics: Performance & Tuning
Hi, We have an application running against an Informix 11.1.FC2 engine; we have recently noticed sequential scanning occurring in several key tables --- is there any way to identify the SQL causing the sequential scans through SMI ?
Lello, Nick says...
>We have an application running against an Informix 11.1.FC2 engine; we
>have recently noticed sequential scanning occurring in several key
>tables --- is there any way to identify the SQL causing the sequential
>scans through SMI
This should give you the required information and SQL
select unique sqx_estcost,sqx_sqlstatement,d.odb_dbname,u.username,u.pid,
sqx_sessionid,u.hostname
from syssqexplain s, sysopendb d, syssessions u
where s.sqx_sdbno = d.odb_odbno
and s.sqx_sessionid = u.sid
and sqx_seqscan = 1
and d.odb_dbname <> 'sysmaster'
and sqx_iscurrent = 'Y'
and odb_iscurrent = 'Y'
and u.pid <> -1
order by 1 desc ;