SELECT i.obj#,
i.samplesize,
i.dataobj#,
Nvl(i.spare1,i.intcols),
i.spare6,
DECODE(i.pctthres$,NULL,NULL,
Mod(Trunc(i.pctthres$ / 256),256)),
ist.cachedblk,
ist.cachehit,
ist.logicalread
FROM ind$ i,
ind_stats$ ist,
(SELECT enabled,
MIN(cols) unicols,
MIN(To_number(Bitand(defer,1))) deferrable#,
MIN(To_number(Bitand(defer,4))) valid#
FROM cdef$
WHERE obj# = :1
AND enabled > 1
GROUP BY enabled) c
WHERE i.obj# = c.enabled (+)
AND i.obj# = ist.obj# (+)
AND i.bo# = :1
ORDER BY i.obj#
SQL before beautify
select i.obj#,i.samplesize,i .dataobj#,nvl( i.spare1,i.intcols),i.spare6,dec ode(i.pctthres$,null,null,mod(trunc(i.pctthres$/25 6),256)),ist.cachedblk,ist.cachehit,ist.logicalrea d from ind$ i, ind_stats$ ist, (select enabled, mi n(cols) unicols,min(to_number(bitand(defer,1))) de ferrable#,min(to_number(bitand(defer,4))) valid# f rom cdef$ where obj#=:1 and enabled > 1 group by e nabled) c where i.obj#=c.enabled(+) and i.obj# = i st.obj#(+) and i.bo#=:1 order by i.obj#