Como identificar consultas com loops aninhados
A seguinte consulta identifica consultas que tiveram eventos de alerta registrados para loops aninhados. Para obter informações sobre como corrigir a condição de loop aninhado, consulte Loop aninhado.
select query, trim(querytxt) as SQL, starttime
from stl_query
where query in (
select distinct query
from stl_alert_event_log
where event like 'Nested Loop Join in the query plan%')
order by starttime desc;