oracle execution plan cost, card meaning

2011-03-19  来源:本站原创  分类:Database  人气:79 

This card is a step in the planned number of rows processed. cost refers to the cbo in the resources spent on this step, this value is a relative value. This step refers to the cbo bytes to process all records of the number of bytes, is estimated from a set of values. http://blog.itpub.net/post/385/45197

■ Cost The cost assigned to each step of the query plan by the CBO. The CBO works by
generating many different execution paths / plans for the same query and assigns a cost to
each and every one. The query plan with the lowest cost wins. In the full outer join example,
we can see the total cost for this query is 10.
■ Card Card is short for Cardinality. It is the estimated number of rows that will flow out
of a given query plan step. In the full outer join example, we can see the optimizer expects
there to be 327 rows in EMP and 4 rows in DEPT.
■ Bytes The size in bytes of the data the CBO expects each step of the plan to return.
This is dependent on the number of rows (Card) and the estimated width of the rows.

View,

This card is a step in the planned number of rows processed.

cost refers to the cbo in the resources spent on this step, this value is a relative value.

This step refers to the cbo bytes to process all records of the number of bytes, is estimated from a set of values.

Transfer: http://blog.itpub.net/post/385/45197

In PL / SQL see the SQL statement execution plan

Many tools can be seen by the general PL / SQL statement execution plan to analyze the performance.

Here through PL / SQL view sql execution plan in several ways:

Method one. Set AutoTrace on;
Then when you execute the sql statement when the execution plan is displayed automatically.
Do not want to see the implementation of planned, set autoTrace off;
Method Two. Execute statement: explain plan for [your sql statement]
For example: explain plan for select * from table1
Then do: select * from table (DBMS_XPLAN.DISPLAY) can see it's implementation plan.

Method three: similar to method two, the former a sql unchanged, the second sentence should read the following sql can also display the execution plan (the same principle):
select plan_table_output from table (dbms_xplan.display ('plan_table', null, 'serial'));

Followed by the two methods is the display table function dbms_xplan bag to get the latest implementation plan.

Also in sql * plus in sql view with set timing on execution time.

Reference:

http://www.oracle-base.com/articles/8i/ExplainPlanUsage.php

http://www.oracle-base.com/articles/9i/DBMS_XPLAN.php

http://www.orafaq.com/node/1420

http://blog.csdn.net/e3002/archive/2007/09/10/1778821.aspx

Transfer: http://jake007.iteye.com/blog/290223

相关文章
  • oracle execution plan cost, card meaning 2011-03-19

    This card is a step in the planned number of rows processed. cost refers to the cbo in the resources spent on this step, this value is a relative value. This step refers to the cbo bytes to process all records of the number of bytes, is estimated fro

  • Oracle execution plan in order to see how the 2011-01-13

    Oracle execution plan ways to read: Look to the right start at the very beginning has been, until you see the place where the far right side by side, for non-parallel, right, the first run: For side by side, relying on the first run. Namely, in the i

  • Oracle execution plan to see how the order is 2011-01-13

    Reading oracle execution plan approach: Start at the very beginning has been to right, side by side until you see the most right place for non-parallel, right, the first execution: For side by side, relying on the first run. That is parallel to inden

  • oracle execution plan 3 2010-03-02

    Environment: oracle 817 + linux + array cabinet swd_billdetail Table 50 million data SUPER_USER Table 2800 data Connect columns are indexed, and super_user in a table corresponds to swd_billdetail many records Table and Index are also analyzed. Pract

  • oracle execution plan 4 2010-03-02

    The statement by adding hints, so that the optimizer oracle nested loop, and a large table as the driving table, generate a new execution plan: select / * + ORDERED USE_NL (A) * / count (a.CHANNEL | | B.user_class) from swd_billdetail B, SUPER_USER A

  • Oracle execution plan from the beginning to view 2010-08-29

    Consider the following scenario, (1) If your data tables to manage 30 million line of card user information; (2) If you manage 10 million kinds of product data sheets; A simple paging query, you truly felt it efficient? If users complain about slow r

  • Oracle execution plan from the start view 2010-08-29

    Consider the following situation (1) If your data table to manage 40 million video information; (2) If you manage 10 million kinds of product data sheets; A simple paging query, you truly feel its efficiency over it? If users complain about slow resp

  • (Installed) oracle execution plan 2011-07-20

    One. Related Concepts Rowid concept Recursive Sql concept Predicate (verb) DRiving Table (table-driven) Probed Table (by probe table) Combination index (concatenated index) Selectivity (selectivity) II. oracle access to the data access methods 1) Ful

  • oracle execution plan 1 2010-03-02

    1. Related concepts Rowid concept: rowid is a pseudo-column, since it is pseudo-column, then this column is not user-defined, but the system itself to add the. Each table has a rowid pseudo-column, but the table does not physically store the value of

  • oracle execution plan 2 2010-03-02

    3. Form the connection between Join an attempt to combine the two tables predicate, one can only connect two tables, table join can also be referred to as worksheets. In the following description, we will use the "row source" instead of "ta

  • oracle execution plan 2010-07-19

    Set the implementation of the plan: set autotrace on; set timing on; Execution time format: Elapsed: 00:00:00.30 Hours : Minutes : Seconds : Seconds /100 Switch User: SQL> connect username/[email protected]

  • oracle execution plan explained 2011-03-31

    [Transfer] http://www.iteye.com/topic/586256 I. Concepts 1 · rowid, pseudo-column: is the system to add their own, and each table has a pseudo-column, not the physical presence. It can not be modified, deleted, and added, rowid in the life cycle of t

  • oracle - how to analyze the execution plan 2011-08-15

    Example 1: Suppose LARGE_TABLE is a large table, and there is no index on the username column, then run the following statement: SQL> SELECT * FROM LARGE_TABLE where USERNAME = 'TEST'; Query Plan ----------------------------------------- SELECT STATE

  • Oracle how to analyze the execution plan (reproduced) 2011-03-31

    Example 1: Suppose LARGE_TABLE is a large table, and there is no index on the username column, then run the following statement: SQL> SELECT * FROM LARGE_TABLE where USERNAME = 'TEST'; Query Plan ----------------------------------------- SELECT STATE

  • Oracle: implementation plan: access path connection table, suggesting Statistical information bind variables 2011-09-09

    SQL execution: Analysis: Hard analysis, soft analysis Implementation Plan: access path (access path), table join (table join), statistics (statistics), bind variable (bind variable), tips (hints) ================================================== ===

  • oracle sql statement execution plan in the analysis method 2011-01-14

    How to generate explain plan? Answer: Run utlxplan.sql. The establishment plan table Specific SQL statement, using the explain plan set statement_id = 'tst1' into plan_table for sql statement Run explain plan look utlxplp.sql or utlxpls.sql (Select *

  • Oracle: plan + cost cost implementation 2011-06-12

    1. Access to the data access methods Full table scan (Full Table Scans, FTS) Table access by ROWID (Table Access by ROWID or rowid lookup) Index Scan (Index Scan or index lookup): the index type and where the different constraints, there are four typ

  • Oracle: hint to manually change the sql execution plan 2011-07-06

    Tips (hint) from Oracle7 introduced, aimed at cost-based optimizer to make up for deficiencies. Tips are usually used to manually change the SQL execution plan to improve the efficiency of enforcement. hints is the oracle to provide a mechanism to te

  • Use Oracle Hint hint to change the execution plan 2011-09-14

    Since each version of the optimizer becomes more complete, Oracle SQL execution to change your plans to provide a method of growing. Oracle Tip of the most common use is as a debugging tool. You can use the prompt to determine the optimal execution p

  • oracle view the SQL execution plan parameters analysis 2010-04-14

    sql_trace been tracking the implementation plan: Call Count CPU Time Elapsed Time Disk Query Current Rows ------- ------ -------- ------------ ---------- ------- --- ---------- ---------- Parse 1 0.000 0.000 0 0 0 0 Execute 1 0.000 0.000 0 0 0 0 Fetc