I used the following sql in sysmaster db to identify sql
using wrong or useless indexes:
select
sqx_sessionid,
sqx_executions,
round(sqx_bufreads/sqx_executions) bufreads,
round(sqx_pagereads/sqx_executions) pagereads,
sqx_estcost,
sqx_estrows,
sqx_index,
sqx_sqlstatement
from sysmaster:syssqexplain
where
sqx_executions > 3000
and
sqx_bufreads / sqx_executions > 50
or
sqx_executions > 100
and
sqx_bufreads / sqx_executions > 1000
or
sqx_executions > 1
and
sqx_bufreads / sqx_executions > 50000;
Andreas