1、分析表,使空表查询准确
select ‘analyze table ‘||table_name||’ compute statistics;’ from user_tables;
执行拼接语句
2、查询所有空表并分配数据空间
//oracle11g 空表默认不分配数据空间
select ‘alter table ‘||table_name||’ allocate extent;’ from user_tables where num_rows=0 or num_rows is null;
执行拼接语句,对空表分配数据空间
3、导出表