关于在数据泵问题:
(1)索引数据导出吗?
(2)源表统计数据导出/导入吗?
1创建测试表
drop table test;
create table test
as
select dbms_random.string('x',50) as x from dual
connect by level<=1e6;
create index idx_test_x on test(x);
begin
dbms_stats.gather_table_stats(user,'TEST');
end;
/
select table_name,num_rows,blocks,to_char(last_analyzed,'YYYYMMDD hh24miss') as l_anay from user_tables where table_name='TEST';
TABLE_NAME NUM_ROWS BLOCKS L_ANAY
---------- ---------- ---------- --------------------
TEST 997971 7884 20140315 153237
select index_name,leaf_blocks,to_char(last_analyzed,'YYYYMMDD hh24miss') as l_anay from user_indexes where table_name='TEST';
INDEX_NAME LEAF_BLOCKS L_ANAY
--------------- ----------- --------------------
IDX_TEST_X 8467 20140315 153238
col segment_name for a20
select segment_name,bytes/1024/1024 from user_segments where segment_name in('TEST','IDX_TEST_X');
SEGMENT_NAME BYTES/1024/1024
-------------------- ---------------
TEST 62
IDX_TEST_X 72
2修改统计数据
begin
dbms_stats.set_table_stats(ownname => user,tabname => 'TEST',numrow