<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Correlation between column predicates</title>
	<atom:link href="http://orainternals.wordpress.com/2008/03/21/correlation-between-column-predicates/feed/" rel="self" type="application/rss+xml" />
	<link>http://orainternals.wordpress.com/2008/03/21/correlation-between-column-predicates/</link>
	<description>Discussions about Oracle performance tuning, RAC, Oracle internal &#38; E-business suite.</description>
	<lastBuildDate>Sun, 19 May 2013 12:13:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: latch: cache buffers chains и настройка запросов с использованием cardinality feedback &#171; Oracle mechanics</title>
		<link>http://orainternals.wordpress.com/2008/03/21/correlation-between-column-predicates/#comment-431</link>
		<dc:creator><![CDATA[latch: cache buffers chains и настройка запросов с использованием cardinality feedback &#171; Oracle mechanics]]></dc:creator>
		<pubDate>Tue, 01 Dec 2009 12:59:20 +0000</pubDate>
		<guid isPermaLink="false">http://orainternals.wordpress.com/?p=22#comment-431</guid>
		<description><![CDATA[[...] (и к сожалению в версии 10.2&#160; ещё недоступна процедура dbms_stats.create_extended_stats для сбора корелированной статистики для значений [...]]]></description>
		<content:encoded><![CDATA[<p>[...] (и к сожалению в версии 10.2&nbsp; ещё недоступна процедура dbms_stats.create_extended_stats для сбора корелированной статистики для значений [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kumar</title>
		<link>http://orainternals.wordpress.com/2008/03/21/correlation-between-column-predicates/#comment-223</link>
		<dc:creator><![CDATA[Kumar]]></dc:creator>
		<pubDate>Sat, 07 Mar 2009 03:42:49 +0000</pubDate>
		<guid isPermaLink="false">http://orainternals.wordpress.com/?p=22#comment-223</guid>
		<description><![CDATA[Hi Riyaz:
The presence of an index on n1, n2 is making a difference for cpu %cost column CREATE INDEX T_VC_IDX  ON T_VC (N1, N2);. The cardinality estimate is still incorrect but which would be the weighing criteria in this case the %cpu cost, bytes or the cardinality.

SQL-458&gt; explain plan for select count(*) from t_vc where n1=10 and n2  = 10;

Explained.

SQL-458&gt; select * from table(dbms_xplan.display);

PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------------------------------------------
Plan hash value: 1953293106

------------------------------------------------------------------------------
&#124; Id  &#124; Operation         &#124; Name     &#124; Rows  &#124; Bytes &#124; Cost (%CPU)&#124; Time     &#124;
------------------------------------------------------------------------------
&#124;   0 &#124; SELECT STATEMENT  &#124;          &#124;     1 &#124;     6 &#124;     1   (0)&#124; 00:00:01 &#124;
&#124;   1 &#124;  SORT AGGREGATE   &#124;          &#124;     1 &#124;     6 &#124;            &#124;          &#124;
&#124;*  2 &#124;   INDEX RANGE SCAN&#124; T_VC_IDX &#124;     1 &#124;     6 &#124;     1   (0)&#124; 00:00:01 &#124;
------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - access(&quot;N1&quot;=10 AND &quot;N2&quot;=10)

14 rows selected.

SQL-458&gt;  explain plan for select count(*) from t_vc where n1=10;

Explained.

SQL-458&gt; select * from table(dbms_xplan.display);

PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------------------------------------------
Plan hash value: 1953293106

------------------------------------------------------------------------------
&#124; Id  &#124; Operation         &#124; Name     &#124; Rows  &#124; Bytes &#124; Cost (%CPU)&#124; Time     &#124;
------------------------------------------------------------------------------
&#124;   0 &#124; SELECT STATEMENT  &#124;          &#124;     1 &#124;     3 &#124;     2   (0)&#124; 00:00:01 &#124;
&#124;   1 &#124;  SORT AGGREGATE   &#124;          &#124;     1 &#124;     3 &#124;            &#124;          &#124;
&#124;*  2 &#124;   INDEX RANGE SCAN&#124; T_VC_IDX &#124;   100 &#124;   300 &#124;     2   (0)&#124; 00:00:01 &#124;
------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - access(&quot;N1&quot;=10)

14 rows selected.]]></description>
		<content:encoded><![CDATA[<p>Hi Riyaz:<br />
The presence of an index on n1, n2 is making a difference for cpu %cost column CREATE INDEX T_VC_IDX  ON T_VC (N1, N2);. The cardinality estimate is still incorrect but which would be the weighing criteria in this case the %cpu cost, bytes or the cardinality.</p>
<p>SQL-458&gt; explain plan for select count(*) from t_vc where n1=10 and n2  = 10;</p>
<p>Explained.</p>
<p>SQL-458&gt; select * from table(dbms_xplan.display);</p>
<p>PLAN_TABLE_OUTPUT<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Plan hash value: 1953293106</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| Id  | Operation         | Name     | Rows  | Bytes | Cost (%CPU)| Time     |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
|   0 | SELECT STATEMENT  |          |     1 |     6 |     1   (0)| 00:00:01 |<br />
|   1 |  SORT AGGREGATE   |          |     1 |     6 |            |          |<br />
|*  2 |   INDEX RANGE SCAN| T_VC_IDX |     1 |     6 |     1   (0)| 00:00:01 |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Predicate Information (identified by operation id):<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>   2 &#8211; access(&#8220;N1&#8243;=10 AND &#8220;N2&#8243;=10)</p>
<p>14 rows selected.</p>
<p>SQL-458&gt;  explain plan for select count(*) from t_vc where n1=10;</p>
<p>Explained.</p>
<p>SQL-458&gt; select * from table(dbms_xplan.display);</p>
<p>PLAN_TABLE_OUTPUT<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Plan hash value: 1953293106</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| Id  | Operation         | Name     | Rows  | Bytes | Cost (%CPU)| Time     |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
|   0 | SELECT STATEMENT  |          |     1 |     3 |     2   (0)| 00:00:01 |<br />
|   1 |  SORT AGGREGATE   |          |     1 |     3 |            |          |<br />
|*  2 |   INDEX RANGE SCAN| T_VC_IDX |   100 |   300 |     2   (0)| 00:00:01 |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Predicate Information (identified by operation id):<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>   2 &#8211; access(&#8220;N1&#8243;=10)</p>
<p>14 rows selected.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
