`
yuping322
  • 浏览: 92472 次
  • 来自: ...
社区版块
存档分类
最新评论

改善sql loader的性能

阅读更多

General Performance Improvement Hints

This section provides a few guidelines that can help to improve the performance of a load. If you must use a certain feature to load your data, by all means do so. But if you have control over the format of the data to be loaded, you can use the following hints to improve load performance:
这节给出了几个常见的方针帮助我们改善sql loader的性能。如果你必须使用一个确定的特征来导入数据,那么就不用考虑这些了。如果你能控制你要导入的数据的格式,你可以使用下面的hint来改善性能。

Make logical record processing efficient:
让逻辑数据处理高效:
Use one-to-one mapping of physical records to logical records (avoid continueif, concatenate)
让物理数据和逻辑一对一的映射(避免使用continueif和concatenate)

Make it easy for the software to figure out physical record boundaries. Use the file processing option string "FIX nnn" or "VAR." If you use the default (stream mode) on most platforms (for example, UNIX and NT) the loader must scan each physical record for the record terminator (newline character).
让sql loader容易找到物理纪录的边界。使用FIX和VAR来描述数据的格式。因为如果你用default的模式来导入数据,大部分的平台下,sql loader需要扫描每条物理纪录来找寻换行符。

Make field setting efficient. Field setting is the process of mapping fields in the datafile to their corresponding columns in the table being loaded. The mapping function is controlled by the description of the fields in the control file. Field setting (along with data conversion) is the biggest consumer of CPU cycles for most loads.
让field设置高效。field设置是将datafile的field映射到表的相应的列的处理过程,这个处理过程被control file中的描述来控制,这个过程是整个导入过程中最消耗CPU的。

Avoid delimited fields; use positional fields. If you use delimited fields, the loader must scan the input data to find the delimiters. If you use positional fields, field setting becomes simple pointer arithmetic (very fast).
避免分隔符fields,使用positional fields。如果你使用分隔符field,loader需要扫描输入数据来找到分隔符,如果使用positional fields,这个将会非常快。

Do not trim whitespace if you do not need to (use PRESERVE BLANKS).
不要用trim空格,如果必需的话,用preserve blanks.

Make conversions efficient. SQL*Loader performs character set conversion and datatype conversion for you. Of course, the quickest conversion is no conversion.
让转换高效。sql loader会自动地执行字符集转换和数据类型转换,所以我们应该避免或者减少这样的转换。

Avoid character set conversions if you can. The loader supports four character sets:
a) client character set (NLS_LANG of the client sqlldr process);
b) datafile character set (usually the same as the client character set);
c) server character set; and
d) server national character set.
Performance is optimized if all character sets are the same. For direct path loads, it is best if the datafile character set and the server character set are the same. If the character sets are the same, character set conversion buffers are not allocated.
避免字符集的转换。loader支持四种字符集:
a) client character set (NLS_LANG of the client sqlldr process);
b) datafile character set (usually the same as the client character set);
c) server character set; and
d) server national character set.
这四种字符集都一样的时候性能最优。direct path loads的时候,如果datafile character set和server character set一样的时候是最好的。如果字符集一样,转换的缓冲区不会被分配。

Use single-byte character sets if you can.
尽量使用单字节的字符集。

Use direct path loads.
使用direct path loads

Use the SORTED INDEXES clause.
使用SORTED INDEXES。

Avoid unnecessary NULLIF and DEFAULTIF clauses. Each clause must be evaluated on each column that has a clause associated with it for every row loaded.
避免不必要的NULLIF和DEFAULTIF。因为每条数据都需要评估每一列。

Use parallel direct path loads and parallel index create when you can.
尽量使用并行的direct path loads和parallel index。
 



分享到:
评论

相关推荐

    oracle学习笔记.docx

    在Oracle学习笔记中,我们关注两个关键知识点:1) SQLLoader的使用和2) Oracle应用程序性能分析。 1. SQLLoader导入数据 SQLLoader是Oracle提供的一种高效的数据加载工具,能够将文本格式的数据批量导入到Oracle...

    Oracle SQL高级编程(资深Oracle专家力作,OakTable团队推荐)--随书源代码

    作者通过总结各自多年的软件开发和教学培训经验,与大家分享了掌握Oracle SQL所独有的丰富功能的技巧所在,内容涵盖SQL执行、联结、集合、分析函数、子句、事务处理等多个方面。读者可以学习到以下几个方面的技巧:...

    oracle的SQl

    - **SQL*Loader**:批量导入大量数据。 - **Recovery Manager (RMAN)**:备份、恢复和灾难恢复工具。 9. **网络组件**: - **Listener**:监听客户端连接请求。 - **Dispatcher**:分配工作到不同的服务器进程...

    ORACLE DBA 数据库维优

    例如,使用GoldenGate进行实时数据复制,利用SQL Profile和Plan Baseline稳定SQL执行计划,以及采用分区技术改善大数据量表的性能。 综上所述,"ORACLE DBA 数据库维优"涉及到的是Oracle数据库的核心运维技能,包括...

    Teradata training material(day3_afternoon.zip)

    5. **数据加载与卸载**:掌握使用FastLoad、MultiLoad、SQLLoader等工具快速导入和导出数据的方法,以及如何优化这些过程。 6. **数据库设计**:了解如何进行星形、雪花或网状模式的设计,以及如何使用物化视图和...

    ORACLE9i_优化设计与系统调整

    §12.7 测试SQL语句性能 151 §12.7.1 SQL_Trace实用工具 151 §12.7.2 TKPROF实用程序 151 §12.8 使用SQL_Trace和TKPROF 151 §12.8.1 设置跟踪初始化参数 152 §12.8.2 启用SQL_Trace实用工具 152 §12.8.3 用...

    OraLoader--用sqlldr的Oracle库表数据装载工具

    OraLoader是一款基于sqlldr的Oracle数据库数据装载工具,它简化了传统SQL*Loader的操作流程,为数据库管理员和开发人员提供了更为方便的数据导入与导出解决方案。传统的SQL*Loader在处理大量数据时表现出色,但需要...

    Linux编程之提升PHP执行速度全攻略分析

    优化SQL查询、使用索引、减少不必要的数据库交互,以及调整数据库配置都能有效提升性能。例如,合理设计数据库表结构,避免全表扫描,利用缓存技术如MySQL的Query Cache。 5. Web服务器优化: 考虑到服务器本身的...

    Oracle 19c和20c新特性解密.pptx

    - Oracle 18c通过优化叶块分裂算法来减少集群消息传递,这有助于改善索引性能。 - 引入了Scalable Sequences,它模拟Scalable方式创建散列索引,从而更好地分散序列生成,降低索引竞争。 **高效性能:可扩展序列...

    oracle concept 10gR2 html版,中英对照,看附件

    此外,SQL优化器(包括成本基优化器和规则基优化器)和自动工作负载库(AWR)帮助分析并改善查询性能。 5. **备份与恢复**:Oracle的恢复管理器(RMAN)在10g R2中得到增强,支持更灵活的备份策略和快速恢复操作。...

    北京-ORACLE畅享互联科技

    - 改善查询性能,特别是对于只访问部分分区的查询。 - 简化维护操作,如备份和恢复。 - 提高数据管理的灵活性。 ### 9. 你刚刚编译了一个PL/SQL Package但是有错误报道,如何显示出错信息 如果在编译PL/SQL ...

    oracle命令大全.pdf

    `ALTER TABLE`的REORGANIZE子句用于优化表的物理结构,例如通过重分布分区、合并分区或交换分区来改善查询性能。 ### 第八章:密码安全与资源管理 Oracle提供了一套完整的安全管理机制,包括用户密码策略、资源限制...

    oracle索引

    1. **创建索引的时机**:在表中插入数据后,尤其是使用`SQL*Loader`或`import`工具批量加载数据之后,创建索引通常更为高效。 2. **选择合适的表和列**:对于经常检索的大表,如果返回的记录数小于一定比例,建议...

    Android系统中SQLite数据库使用效率研究.pdf

    4. **异步操作**:在主线程上进行数据库操作会导致应用卡顿,应将数据库操作放在子线程或者使用AsyncTask、Loader等机制来实现异步处理。 5. **缓存策略**:利用内存缓存预加载数据,减少数据库访问。例如,使用...

    海量数据的设计(十三讲)

    这讲将介绍批量加载数据的方法,如SQL*Loader、Direct Path Insert,以及如何在保证数据完整性和性能的前提下进行数据迁移。 第十二讲:RAC & DG Real Application Clusters (RAC) 和 Data Guard (DG) 是Oracle...

    PRM-DUL Oracle(数据库恢复工具) v4.1.zip

    》》以纯文本导出时,能够自动生成建表的SQL语句和SQL*Loader导入所需的control文件 PRM-DUL Oracle(数据库恢复工具) v4.1更新日志 1. 对使用DELETE命令误删除的数据的救援恢复支持 2. 对在字典模式下LOB数据Data...

    Oracle9i的init.ora参数中文说明

    ), interpreted (然后 PL/SQL 模块将被编译为 PL/SQL 字节代码格式), debug (PL/SQL 模块将用探测调试符号来编译), non_debug。 默认值: " interpreted, non_debug " plsql_native_linker: 说明: 此参数指定链接...

Global site tag (gtag.js) - Google Analytics