Home Database Mysql Tutorial oracle 优化的一点体会

oracle 优化的一点体会

Jun 07, 2016 pm 06:06 PM
oracle optimization

oracle 优化的一点体会大家可以参考下,提升运行效率。

关于oracle 优化的内容很多,概念庞杂,不过可以总结出一个大纲性的东西作为需要考虑的方向,然后再逐步细化。oracle优化按重要性需要考虑设计、开发、调整几个方面。

首先是设计,这是最重要的部分,借用TOM的话:“性能是设计出来的,不是调整出来的”。设计分为逻辑设计和物理设计,逻辑设计一般要遵循3NF,同时也要根据应用的需要引入逆规范化的设计,应为NF设计虽然消除了数据冗余,但随着规范化越高需要连接的表可能越多,同样对性能有影响,所以需要平衡考虑,至于何时要3NF,何时要逆规范化,要是具体情况而定。

物理设计一个是存储,比如物理文件、联机日志文件、归档日志文件的磁盘布局,各种RAID的使用等(在这方面piner的分析比较全面细致),第二是要根据应用的特性,选择文件组织方式,灵活运用oracle的各种表和索引类型,例如交叉表可以考虑使用IOT、读密集型并且经常关联的字段使用cluster,还有全局临时表、外部表等等。除了普通的B树索引外,在低基数情况下考虑使用位图索引,使用函数时引入基于函数的索引等。

其次是开发阶段,比如老生常谈的使用绑定变量、外键加索引、使用bulk collect、分析函数、直接路径加载,在OLAP应用中使用partition、MV、位图索引、并行化操作等等。没种技术要深入研究都有很多内容。

最后才是调整,这是在出现性能问题时采用的手段。这已经形成了一个完整的方法论。
1)设立合理的性能优化目标。
2)测量并记录当前性能(STATSPACK、AWR等)。
3)确定当前Oracle性能瓶颈(从Oracle 等待接口v$system_event、v$session_event和v$session_wait中获得等待事件,进而找出影响性能的对象和sql语句
)。
4)把等待事件记入跟踪文件(autotrace、10046事件等)。
5)确定当前的OS瓶颈(sar、iostat、cpustat、mpstat、netstat、top、osview等)。
6)优化所需的成分(应用程序、数据库、I/O、争用、OS等)。
7)跟踪并实施更改控制过程。
8)测量并记录当前性能
9)重复步骤3到7,直到满足优化目标

以上是本人对Oracle优化的一些粗线条的体会,可以指出优化需要考虑的大的方向,而相关的技术细节非常多,每项都要仔细研究,正如piner总结的:多思考、多实践、多总结。

再记点题外话,公司节后要对技术部作人员调整,说白了就是裁人,这次除了要个网管保证能上网就不留技术的人了,假期准备简历,节后找工作。
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How long will Oracle database logs be kept? How long will Oracle database logs be kept? May 10, 2024 am 03:27 AM

The retention period of Oracle database logs depends on the log type and configuration, including: Redo logs: determined by the maximum size configured with the "LOG_ARCHIVE_DEST" parameter. Archived redo logs: Determined by the maximum size configured by the "DB_RECOVERY_FILE_DEST_SIZE" parameter. Online redo logs: not archived, lost when the database is restarted, and the retention period is consistent with the instance running time. Audit log: Configured by the "AUDIT_TRAIL" parameter, retained for 30 days by default.

The order of the oracle database startup steps is The order of the oracle database startup steps is May 10, 2024 am 01:48 AM

The Oracle database startup sequence is: 1. Check the preconditions; 2. Start the listener; 3. Start the database instance; 4. Wait for the database to open; 5. Connect to the database; 6. Verify the database status; 7. Enable the service (if necessary ); 8. Test the connection.

How to see the number of occurrences of a certain character in Oracle How to see the number of occurrences of a certain character in Oracle May 09, 2024 pm 09:33 PM

To find the number of occurrences of a character in Oracle, perform the following steps: Get the total length of a string; Get the length of the substring in which a character occurs; Count the number of occurrences of a character by subtracting the substring length from the total length.

Oracle database server hardware configuration requirements Oracle database server hardware configuration requirements May 10, 2024 am 04:00 AM

Oracle database server hardware configuration requirements: Processor: multi-core, with a main frequency of at least 2.5 GHz. For large databases, 32 cores or more are recommended. Memory: At least 8GB for small databases, 16-64GB for medium sizes, up to 512GB or more for large databases or heavy workloads. Storage: SSD or NVMe disks, RAID arrays for redundancy and performance. Network: High-speed network (10GbE or higher), dedicated network card, low-latency network. Others: Stable power supply, redundant components, compatible operating system and software, heat dissipation and cooling system.

How much memory does oracle require? How much memory does oracle require? May 10, 2024 am 04:12 AM

The amount of memory required by Oracle depends on database size, activity level, and required performance level: for storing data buffers, index buffers, executing SQL statements, and managing the data dictionary cache. The exact amount is affected by database size, activity level, and required performance level. Best practices include setting the appropriate SGA size, sizing SGA components, using AMM, and monitoring memory usage.

Oracle scheduled tasks execute the creation step once a day Oracle scheduled tasks execute the creation step once a day May 10, 2024 am 03:03 AM

To create a scheduled task in Oracle that executes once a day, you need to perform the following three steps: Create a job. Add a subjob to the job and set its schedule expression to "INTERVAL 1 DAY". Enable the job.

How much memory is needed to use oracle database How much memory is needed to use oracle database May 10, 2024 am 03:42 AM

The amount of memory required for an Oracle database depends on the database size, workload type, and number of concurrent users. General recommendations: Small databases: 16-32 GB, Medium databases: 32-64 GB, Large databases: 64 GB or more. Other factors to consider include database version, memory optimization options, virtualization, and best practices (monitor memory usage, adjust allocations).

How to read dbf file in oracle How to read dbf file in oracle May 10, 2024 am 01:27 AM

Oracle can read dbf files through the following steps: create an external table and reference the dbf file; query the external table to retrieve data; import the data into the Oracle table.

See all articles