Oracle developers analyze SQL Execution Plan concerns

Source: Internet
Author: User

Oracle developers analyze SQL Execution plans with complicated and complex focus. They may be confused by the developers' eyes and cause a sexy and silly SQL statement to run on the server, focus on a few parts, as for others, of course, don't you like, (I) Number of returned rows Oracle optimizer is a major indicator of cost-based, evaluation cost is the number of rows to query generally, if the returned value is 50% or the returned value of a large table exceeds of the total number of records, the space that can be optimized is very small and marked: (ii) return the ratio of rows to logical reads. The following logical read overhead is acceptable in each row: each row requires 7 logical reads. (3) Aggregate Queries. For this type of query, note that: ① The returned row should be the number of rows in the scan table, rather than the number of rows in the Table. ② general optimization skills: the index is treated as a thin Table without having to go back to the Table (the returned Table is marked as Table Access By index rowid). The figure is as follows: (4) The accuracy execution plan of the prediction row contains a column named: rows: This is the row returned by Oracle prediction. In some cases, it may not be because TEMA is preparing to compare this value with the row actually returned. If it is inaccurate, it is necessary to find the cause, such as the Statistical Information, histogram, high water level... the following figure shows that Predicate Information has two values: filter and access, where and access are generally indexed read or hash join. Follow this bird. The most important thing is to check whether data type conversion has occurred. This limits the index and increases the overhead. marked: (6) The statistical information of the dynamic sampling table has expired or deteriorated, or the table has not been analyzed at all. The Marked chart is: Well, write so much first, and then complete it later.

Related Article

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.