以下查询输出过去 7 天对表的总逻辑读取:
SELECT owner as schema, object_name AS table_name,
sum(logical_reads_delta) AS total_logical_reads
FROM dba_hist_seg_stat a, dba_hist_seg_stat_obj b
WHERE owner != 'SYS'
and owner!= 'SYSTEM'
AND a.obj# = b.obj#
AND a.dataobj# = b.dataobj#
AND object_type = 'TABLE'
GROUP BY owner, object_name
order by sum(logical_reads_delta) desc;
如果它不在输出中,则它没有逻辑读取。
我实际上正在寻找一种方法将数据库中的所有表(即使是没有逻辑读取的表)与上述输出连接起来。外联?
结果有望成为数据库上最近活动的列表,其中列出了所有具有逻辑读取的表(以及一些具有空值的表)
想法如何做到这一点?