possible tuning for query
I have the following query:
select * from triton.ttdpur045100 t
where t$spur = 3
and t$suno ='852906'
and t$srnb = 0
and (
(t$bqua <> 0
and not exists (select b.*
from triton.ttdpur045100 b
where b.t$orno = t.t$orno
and b.t$pono = t.t$pono
and b.t$srnb > 0
and b.t$dqua = 0
and b.t$bqua = 0)
)
or not exists (select a.t$srnb
from triton.ttdpur045100 a
where a.t$orno = t.t$orno
and a.t$pono = t.t$pono
and a.t$srnb > 0)
);
The explain plan for the query shows the following: