设为首页 加入收藏

TOP

使用DataPump的Sample参数来进行数据抽样(二)
2016-03-06 12:56:29 】 浏览:511
Tags:使用 DataPump Sample 参数 进行 数据 抽样
object type SCHEMA_EXPORT/VIEW/VIEW


Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT


Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS


. . exported "SCOTT"."SM_TEST" 6.406 MB 66611 rows


. . exported "SCOTT"."DEPT" 5.859 KB 1 rows


. . exported "SCOTT"."EMP" 8.359 KB 9 rows


. . exported "SCOTT"."SALGRADE" 5.835 KB 3 rows


. . exported "SCOTT"."BONUS" 0 KB 0 rows


Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded


******************************************************************************


Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is:


/u01/app/admin/sicsdb/dpdump/TEST_2.dmp


Job "SYS"."SYS_EXPORT_SCHEMA_01" successfully completed at Mon Nov 23 13:51:48 2015 elapsed 0 00:00:16


采样比例在Schema下所有数据表范围内生效,所有数据表基本上以50%的比例进行采样处理。


最后,如果我们导出多张数据表,只对某些数据表进行采样处理,那么如何指定sample参数呢?


[oracle@localhost ~]$ expdp \"/ as sysdba\" dumpfile=TEST_3.dmp schemas=scott sample=scott.sm_test:30


Export: Release 11.2.0.4.0 - Production on Mon Nov 23 13:52:50 2015


Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production


With the Partitioning, OLAP, Data Mining and Real Application Testing options


Starting "SYS"."SYS_EXPORT_SCHEMA_01": "/******** AS SYSDBA" dumpfile=TEST_3.dmp schemas=scott sample=scott.sm_test:30


Estimate in progress using BLOCKS method...


Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA


Total estimation using BLOCKS method: 4.987 MB


Processing object type SCHEMA_EXPORT/USER


Processing object type SCHEMA_EXPORT/SYSTEM_GRANT


Processing object type SCHEMA_EXPORT/ROLE_GRANT


Processing object type SCHEMA_EXPORT/DEFAULT_ROLE


Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA


Processing object type SCHEMA_EXPORT/TABLE/TABLE


Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT


Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX


Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT


Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS


Processing object type SCHEMA_EXPORT/VIEW/VIEW


Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT


Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS


. . exported "SCOTT"."SM_TEST" 3.861 MB 40146 rows


. . exported "SCOTT"."DEPT" 5.960 KB 5 rows


. . exported "SCOTT"."EMP" 8.562 KB 14 rows


. . exported "SCOTT"."SALGRADE" 5.859 KB 5 rows


. . exported "SCOTT"."BONUS" 0 KB 0 rows


Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded


******************************************************************************


Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is:


/u01/app/admin/sicsdb/dpdump/TEST_3.dmp


Job "SYS"."SYS_EXPORT_SCHEMA_01" successfully completed at Mon Nov 23 13:53:00 2015 elapsed 0 00:00:09


从上面实验中,如果只是针对特定数据表进行采样处理,需要通过数据表名:采样比例方式来指定。


3、结论


根据笔者的猜测,sample参数在expdp中主要是传导到select语句的sample语句来实现。


首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Oracle 11g中的char类型使用 下一篇Alter Log中VKTM时间drift漂移现象

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目