DBの全テーブルと、いまのリアルなレコード数が知りたい
select
table_name,
to_number(
extractvalue(
xmltype(
dbms_xmlgen.getxml('select count(*) c from '||table_name))
,'/ROWSET/ROW/C')) count
from user_tables
WHERE TABLE_NAME NOT LIKE 'BIN$%'
and (iot_type != 'IOT_OVERFLOW' or iot_type is null)
order by table_name;
※select table_name,num_rows from user_tables だと、
統計情報取得タイミングでデータが固定されるのか、
空のテーブルのnum_rowsが0じゃなかったりしたので、こっちで。