Home Database Mysql Tutorial Oracle案例:分析10053跟踪文件

Oracle案例:分析10053跟踪文件

Jun 07, 2016 pm 04:53 PM
oracle data

首先介绍与CBO计算成本有关的一些参数说明,介绍了CBO在查询中如何计算成本。接着给出10053跟踪文件分析的一般方法,最后结合一个

  首先介绍与CBO计算成本有关的一些参数说明,介绍了CBO在查询中如何计算成本。接着给出10053跟踪文件分析的一般方法,最后结合一个具体跟踪文件,对如何分析10053跟踪文件进行详细阐述。

  1. 关于Oracle案例学习

  Oracle案例学习主要是作为一种工具,主要提供对复杂事件、进程、过程以及一系列相关事件的信息与知识。每个案例都是在处理实际问题的经验基础上编写的。

  每个学习案例包含一定的技能级别。技能级别指文档的阅读者在学习此案例之前,应该具备什么样的技能级别。

  有以下几个级别:

   专家级:在相关主题领域有丰富经验

   中级:在相关主题领域有一定的经验

   入门级:在相关主题领域没什么经验

  本案例建议的级别:专家级

  2. 案例学习摘要

  本案例使用跟踪文件,阐述分析10053跟踪文件的方法体系。注意,10053事件跟踪文件主要用于辅助oracle开发者以及技术支持来诊断优化器相关的问题,它随着新版本或者补丁集而有所变化。本文的主要目的不是对10053跟踪文件提供全面的参考,而是介绍oracle工程师怎样使用这种跟踪文件。

  同时,我们将窥探CBO在查询中如何计算成本,以及CBO是如何最终获得执行计划的。

  需要指出的是,CBO在估算成本的时候,会随着版本的变化,其算法会有不同。

  这里我们将会分析一个糟糕的执行计划,,并判断出CBO是如何计算成本并导致不好的计划的。我们会在不同地方比较10053跟踪,但主要精力还是放在这个糟糕的计划是如何计算成本的。良好的执行计划一般而言比不好的执行计划(其中没有考虑使用索引)更简短。

  检查10053的原因一般是为了搞清楚CBO为什么这样进行选择。10053可以帮我们回答诸如“索引为什么没被使用”之类的问题。“CBO为什么要选择全表扫描?” 。一般来说,10053不是处理性能问题时最先使用的方法---在这方面,查看执行计划并使用tkprof工具能更好的获取信息。10053用于深入CBO进行选择的原因分析。

  3. 案例历史

  执行一个未使用提示的sql语句(一个包含3种连接的select语句)需要9个小时,而如果使用"NO_INDEX"提示,将会在4分钟内执行完。表使用的是分区表,而且用到了并行查询。另外,用户将"OPTIMIZER_INDEX_CACHING"设置为70(不知用户为什么这么做,我们猜测可能是因为当时他们并没有得到想要的执行计划才这么做)。此参数设置效果可以使单块索引I/O下降70%。

  使用10053跟踪,获取未加提示(“不好的”)的执行计划与加提示(“好的”)的执行计划。两个执行计划的主要不同点是,未加提示的执行计划使用nested嵌套循环连接方式,内层连接使用的是INDEX FULL SCAN(不是index fast full scan)操作来作为内层行集。加提示的执行计划使用哈希连接,INDEX FAST FULL SCAN (IFF)操作的结果集作为内层行集。

  注意,就本案例而言,新版本中使用10053产生的跟踪文件可能会发生很大变化。

  一般而言,新版本的跟踪文件比较容易阅读,在"预分析工作"部分需要做的工作较少。

linux

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 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months 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 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.

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.

70B model generates 1,000 tokens in seconds, code rewriting surpasses GPT-4o, from the Cursor team, a code artifact invested by OpenAI 70B model generates 1,000 tokens in seconds, code rewriting surpasses GPT-4o, from the Cursor team, a code artifact invested by OpenAI Jun 13, 2024 pm 03:47 PM

70B model, 1000 tokens can be generated in seconds, which translates into nearly 4000 characters! The researchers fine-tuned Llama3 and introduced an acceleration algorithm. Compared with the native version, the speed is 13 times faster! Not only is it fast, its performance on code rewriting tasks even surpasses GPT-4o. This achievement comes from anysphere, the team behind the popular AI programming artifact Cursor, and OpenAI also participated in the investment. You must know that on Groq, a well-known fast inference acceleration framework, the inference speed of 70BLlama3 is only more than 300 tokens per second. With the speed of Cursor, it can be said that it achieves near-instant complete code file editing. Some people call it a good guy, if you put Curs

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.

AI startups collectively switched jobs to OpenAI, and the security team regrouped after Ilya left! AI startups collectively switched jobs to OpenAI, and the security team regrouped after Ilya left! Jun 08, 2024 pm 01:00 PM

Last week, amid the internal wave of resignations and external criticism, OpenAI was plagued by internal and external troubles: - The infringement of the widow sister sparked global heated discussions - Employees signing "overlord clauses" were exposed one after another - Netizens listed Ultraman's "seven deadly sins" Rumors refuting: According to leaked information and documents obtained by Vox, OpenAI’s senior leadership, including Altman, was well aware of these equity recovery provisions and signed off on them. In addition, there is a serious and urgent issue facing OpenAI - AI safety. The recent departures of five security-related employees, including two of its most prominent employees, and the dissolution of the "Super Alignment" team have once again put OpenAI's security issues in the spotlight. Fortune magazine reported that OpenA

See all articles