Using a case study to thoroughly understand 10046trace-byte-level in-depth cracking

Source: Internet
Author: User
Reprinted please indicate the source: blog. csdn. netguoyjoearticledetails0000405832014.7.23 LATE 20: 30Oraclesupport group cat master shared "using a case to thoroughly understand 10046trace-byte-level in-depth cracking". For more courses, please log on to the website www. jianfengedu. comDiscuzdetailid56

Reprinted please indicate the source: http://blog.csdn.net/guoyjoe/article/details/37840583 2014.7.23 late at Oracle support Group cat master share "through a case thoroughly read 10046 trace-byte-level in-depth cracking" if you need to learn more courses please log on to the website http://www.jianfengedu.com/Discuz/detail/id/56

Reprinted please indicate the source: http://blog.csdn.net/guoyjoe/article/details/37840583

PM, 10046-byte-level in-depth cracking

To learn more, log on to the http://www.jianfengedu.com/Discuz/detail/id/56

The first class in China to become the top master of QTune

SQL optimization course series I CBO internal Algorithms

-- "Can be heard from the beginning, truly become a master of QTune

I only asked one question. Can someone really figure out the> choice rate? DIS is not clear.

++ Let me show you something

--------------------------------------------------------------------------| Id  | Operation  | Name | Rows  | Bytes | Cost (%CPU)| Time |--------------------------------------------------------------------------|   0 | SELECT STATEMENT  | |     1 |    10 |   349   (1)| 00:00:05 ||*  1 |  TABLE ACCESS FULL| T1 |     1 |    10 |   349   (1)| 00:00:05 |--------------------------------------------------------------------------Predicate Information (identified by operation id):---------------------------------------------------   1 - filter("OBJECT_NAME"='00440')table name:T1column name:OBJECT_NAMEnum_rows:87417num distinct:48128num_nulls:797density:.0000115446779034865histogram:HEIGHT BALANCEDhigh_value:4435(D5) -- internal value:354151154089362000000000000000000000low_value:3030343432(00442) -- internal value:25020794088876500000000000000000000000400 internal Value : 250207940886347000000000000000000000ENDPOINT_VALUE     ENDPOINT_NUMBER BUCKET_COUNT-------------------- --------------- ------------46641  40147796  411A1  498B2  589C3  668D5  759

Density = (Bucket_total-Buckets_all_popular_value )/

Sel =. 00001136*(87417-797)/87417*(1-(250207940888765000000000000000000000-250207940886347000000000000000000000)/(354151154089362000000000000000000000-250207940888765000000000000000000000 )))

This is: col = val and val 2 * low_value-high_value

High_value: 4435 (D5) -- internal value: 354151154089362000000000000000000000

00400 internal Value: 250207940886347000000000000000000000

How are these three numbers obtained?

D5 is saved in dba_tab_columns as follows: 4435. In fact, the internal oracle computing value is 354151154089362000000000000000000000.

As a matter of fact, he is telling you how to COST. Instead, he wants to tell you how to study oracle algorithms.

It is actually telling you how to guess. It is also wrong.

For example, cardinality uses ceil (). In fact, oracle uses round in most cases.

Are you helpless in the face of slow production SQL statements? I am just an example here...

DSI Series 1 CBO internal algorithm-2014.8.5 startup (14 class hours, 7 class days), ¥499/person

Choice rate, base calculation formula

1. Important Concepts

Join

5. Hash Join and Sort Merge Join

--------------- Recently shared activity video
Caibird2005 share the topic "Table splitting, partition tables, and parallel computing in the data warehouse environment"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.