<?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: Frequency Histogram 4</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2010/10/05/frequency-histogram-4/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2010/10/05/frequency-histogram-4/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Fri, 24 May 2013 13:27:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Randolf Geist</title>
		<link>http://jonathanlewis.wordpress.com/2010/10/05/frequency-histogram-4/#comment-40734</link>
		<dc:creator><![CDATA[Randolf Geist]]></dc:creator>
		<pubDate>Fri, 10 Jun 2011 11:26:49 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4582#comment-40734</guid>
		<description><![CDATA[&gt; I had also made a comment in the same line about Oracle extracting the first 20 bytes, and I can’t think where I got that from.

May be 0x20 = 32?

Randolf]]></description>
		<content:encoded><![CDATA[<p>&gt; I had also made a comment in the same line about Oracle extracting the first 20 bytes, and I can’t think where I got that from.</p>
<p>May be 0&#215;20 = 32?</p>
<p>Randolf</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2010/10/05/frequency-histogram-4/#comment-40730</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Fri, 10 Jun 2011 11:11:45 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4582#comment-40730</guid>
		<description><![CDATA[Randolf,

Thanks for pointing out the error - now fixed.  I had also made a  comment in the same line about Oracle extracting the first 20 bytes, and I can&#039;t think where I got that from.

You&#039;re right about the &quot;less than six characters&quot; of course. I actually gave an example of this with the &quot;NEW / NEVÿÿÿ&quot; switch in the example, but I&#039;ve added in a comment to that effect where I make the point about the 6th character possibly being wrong.]]></description>
		<content:encoded><![CDATA[<p>Randolf,</p>
<p>Thanks for pointing out the error &#8211; now fixed.  I had also made a  comment in the same line about Oracle extracting the first 20 bytes, and I can&#8217;t think where I got that from.</p>
<p>You&#8217;re right about the &#8220;less than six characters&#8221; of course. I actually gave an example of this with the &#8220;NEW / NEVÿÿÿ&#8221; switch in the example, but I&#8217;ve added in a comment to that effect where I make the point about the 6th character possibly being wrong.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Randolf Geist</title>
		<link>http://jonathanlewis.wordpress.com/2010/10/05/frequency-histogram-4/#comment-40721</link>
		<dc:creator><![CDATA[Randolf Geist]]></dc:creator>
		<pubDate>Thu, 09 Jun 2011 20:27:45 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4582#comment-40721</guid>
		<description><![CDATA[Jonathan,

I just came across this while I was working on a different issue - I think your description above how Oracle arrives at the numeric representation is not consistent with what you&#039;ve outlined in &quot;Cost Based Oracle - Fundamentals&quot;.

The first step should read: Take the first 15 bytes, not six (Of course it&#039;s obvious where the six comes from, but the result will not be consistent with Oracle&#039;s result when using only the first six bytes).

By the way, for a original string less than six (single-byte) characters the last character can be incorrect due to the rounding applied, so you don&#039;t end up necessarily with five correctly extracted characters sometimes.

Randolf]]></description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>I just came across this while I was working on a different issue &#8211; I think your description above how Oracle arrives at the numeric representation is not consistent with what you&#8217;ve outlined in &#8220;Cost Based Oracle &#8211; Fundamentals&#8221;.</p>
<p>The first step should read: Take the first 15 bytes, not six (Of course it&#8217;s obvious where the six comes from, but the result will not be consistent with Oracle&#8217;s result when using only the first six bytes).</p>
<p>By the way, for a original string less than six (single-byte) characters the last character can be incorrect due to the rounding applied, so you don&#8217;t end up necessarily with five correctly extracted characters sometimes.</p>
<p>Randolf</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eugen IACOB</title>
		<link>http://jonathanlewis.wordpress.com/2010/10/05/frequency-histogram-4/#comment-39348</link>
		<dc:creator><![CDATA[Eugen IACOB]]></dc:creator>
		<pubDate>Sun, 30 Jan 2011 21:18:29 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4582#comment-39348</guid>
		<description><![CDATA[Page 117 more exactly. That helped me explain a client strange behaviour. Thanks for this Jonathan!]]></description>
		<content:encoded><![CDATA[<p>Page 117 more exactly. That helped me explain a client strange behaviour. Thanks for this Jonathan!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2010/10/05/frequency-histogram-4/#comment-39281</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sun, 23 Jan 2011 14:21:46 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4582#comment-39281</guid>
		<description><![CDATA[I created a series of test cases, and proposed the simplest explanation for the results.
I published some details in &lt;a href=&quot;http://www.amazon.co.uk/product-reviews/1590596366/ref=dp_top_cm_cr_acr_txt?ie=UTF8&amp;showViewpoints=1&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;&lt;strong&gt;&quot;Cost Based Oracle - Fundamentals.&quot;&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;]]></description>
		<content:encoded><![CDATA[<p>I created a series of test cases, and proposed the simplest explanation for the results.<br />
I published some details in <a href="http://www.amazon.co.uk/product-reviews/1590596366/ref=dp_top_cm_cr_acr_txt?ie=UTF8&amp;showViewpoints=1" rel="nofollow"><em><strong>&#8220;Cost Based Oracle &#8211; Fundamentals.&#8221;</strong></em></a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rajeshwaran</title>
		<link>http://jonathanlewis.wordpress.com/2010/10/05/frequency-histogram-4/#comment-39265</link>
		<dc:creator><![CDATA[Rajeshwaran]]></dc:creator>
		<pubDate>Sat, 22 Jan 2011 08:39:21 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4582#comment-39265</guid>
		<description><![CDATA[How did you arrived at the algorithm described above?

Is that available in Oracle product documentation? if yes, can you provide link to that?]]></description>
		<content:encoded><![CDATA[<p>How did you arrived at the algorithm described above?</p>
<p>Is that available in Oracle product documentation? if yes, can you provide link to that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2010/10/05/frequency-histogram-4/#comment-39250</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Fri, 21 Jan 2011 17:19:30 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4582#comment-39250</guid>
		<description><![CDATA[Rajeshwaran,
This seems to be covered by my comment:
&lt;ul&gt;
&lt;em&gt;With a nice friendly single-byte character code, the first 5 characters will be extracted correctly, and the sixth will be pretty close to the original.&lt;/em&gt;&lt;/ul&gt;

I stopped at six characters because I knew that the 7th onwards would be garbage.]]></description>
		<content:encoded><![CDATA[<p>Rajeshwaran,<br />
This seems to be covered by my comment:</p>
<ul>
<em>With a nice friendly single-byte character code, the first 5 characters will be extracted correctly, and the sixth will be pretty close to the original.</em></ul>
<p>I stopped at six characters because I knew that the 7th onwards would be garbage.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rajeshwaran</title>
		<link>http://jonathanlewis.wordpress.com/2010/10/05/frequency-histogram-4/#comment-39249</link>
		<dc:creator><![CDATA[Rajeshwaran]]></dc:creator>
		<pubDate>Fri, 21 Jan 2011 15:46:18 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4582#comment-39249</guid>
		<description><![CDATA[&lt;code&gt;
rajesh@10GR2&gt; SELECT endpoint_number,
  2    endpoint_number - NVL(prev_endpoint,0) frequency,
  3    hex_values,
  4    chr(to_number(SUBSTR(hex_values, 2,2),&#039;XX&#039;))
  5    &#124;&#124; chr(to_number(SUBSTR(hex_values, 4,2),&#039;XX&#039;))
  6    &#124;&#124; chr(to_number(SUBSTR(hex_values, 6,2),&#039;XX&#039;))
  7    &#124;&#124; chr(to_number(SUBSTR(hex_values, 8,2),&#039;XX&#039;))
  8    &#124;&#124; chr(to_number(SUBSTR(hex_values,10,2),&#039;XX&#039;))
  9    &#124;&#124; chr(to_number(SUBSTR(hex_values,12,2),&#039;XX&#039;))
 10    &#124;&#124; chr(to_number(SUBSTR(hex_values,14,2),&#039;XX&#039;))
 11    &#124;&#124; chr(to_number(SUBSTR(hex_values,16,2),&#039;XX&#039;))
 12    &#124;&#124; chr(to_number(SUBSTR(hex_values,18,2),&#039;XX&#039;))
 13    &#124;&#124; chr(to_number(SUBSTR(hex_values,20,2),&#039;XX&#039;))
 14    &#124;&#124; chr(to_number(SUBSTR(hex_values,22,2),&#039;XX&#039;))
 15    &#124;&#124; chr(to_number(SUBSTR(hex_values,24,2),&#039;XX&#039;))
 16    as column_values
 17  FROM
 18    (SELECT endpoint_number,
 19      lag(endpoint_number,1) over( order by endpoint_number ) prev_endpoint,
 20      TO_CHAR(endpoint_value,&#039;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&#039;)hex_values,
 21      endpoint_actual_value
 22    FROM user_tab_histograms
 23    WHERE table_name  = &#039;T&#039;
 24    AND column_name = &#039;OBJECT_NAME&#039;
 25    )
 26  ORDER BY endpoint_number ;

ENDPOINT_NUMBER  FREQUENCY HEX_VALUES                      COLUMN_VALUE
--------------- ---------- ------------------------------- ------------
              1          1  4144545F53544315EDB85726C00000 ADT_STC§f+W&amp;
              2          1  41534F5F53452F1F9B9266BEA00000 ASO_SE/?++f+
              5          3  49525F5354474CEC7454244BE00000 IR_STGL8tT$K
              7          2  49585F53544751CD2477F0CDA00000 IX_STGQ-$w=-
              8          1  504B475F50523F5F66AC4457A00000 PKG_PR?_f¼DW
              9          1  52505449524141D86FB6896A200000 RPTIRAA+o¦+j
             10          1  52505449524141D86FB6896A200000 RPTIRAA+o¦+j

7 rows selected.

Elapsed: 00:00:00.90
rajesh@10GR2&gt; &lt;/code&gt;

I am not getting the proper values in the column &lt;b&gt;COLUMN_VALUE&lt;/b&gt;. Is this issue is due to Character set?]]></description>
		<content:encoded><![CDATA[<p><code><br />
rajesh@10GR2&gt; SELECT endpoint_number,<br />
  2    endpoint_number - NVL(prev_endpoint,0) frequency,<br />
  3    hex_values,<br />
  4    chr(to_number(SUBSTR(hex_values, 2,2),'XX'))<br />
  5    || chr(to_number(SUBSTR(hex_values, 4,2),'XX'))<br />
  6    || chr(to_number(SUBSTR(hex_values, 6,2),'XX'))<br />
  7    || chr(to_number(SUBSTR(hex_values, 8,2),'XX'))<br />
  8    || chr(to_number(SUBSTR(hex_values,10,2),'XX'))<br />
  9    || chr(to_number(SUBSTR(hex_values,12,2),'XX'))<br />
 10    || chr(to_number(SUBSTR(hex_values,14,2),'XX'))<br />
 11    || chr(to_number(SUBSTR(hex_values,16,2),'XX'))<br />
 12    || chr(to_number(SUBSTR(hex_values,18,2),'XX'))<br />
 13    || chr(to_number(SUBSTR(hex_values,20,2),'XX'))<br />
 14    || chr(to_number(SUBSTR(hex_values,22,2),'XX'))<br />
 15    || chr(to_number(SUBSTR(hex_values,24,2),'XX'))<br />
 16    as column_values<br />
 17  FROM<br />
 18    (SELECT endpoint_number,<br />
 19      lag(endpoint_number,1) over( order by endpoint_number ) prev_endpoint,<br />
 20      TO_CHAR(endpoint_value,'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')hex_values,<br />
 21      endpoint_actual_value<br />
 22    FROM user_tab_histograms<br />
 23    WHERE table_name  = 'T'<br />
 24    AND column_name = 'OBJECT_NAME'<br />
 25    )<br />
 26  ORDER BY endpoint_number ;</p>
<p>ENDPOINT_NUMBER  FREQUENCY HEX_VALUES                      COLUMN_VALUE<br />
--------------- ---------- ------------------------------- ------------<br />
              1          1  4144545F53544315EDB85726C00000 ADT_STC§f+W&amp;<br />
              2          1  41534F5F53452F1F9B9266BEA00000 ASO_SE/?++f+<br />
              5          3  49525F5354474CEC7454244BE00000 IR_STGL8tT$K<br />
              7          2  49585F53544751CD2477F0CDA00000 IX_STGQ-$w=-<br />
              8          1  504B475F50523F5F66AC4457A00000 PKG_PR?_f¼DW<br />
              9          1  52505449524141D86FB6896A200000 RPTIRAA+o¦+j<br />
             10          1  52505449524141D86FB6896A200000 RPTIRAA+o¦+j</p>
<p>7 rows selected.</p>
<p>Elapsed: 00:00:00.90<br />
rajesh@10GR2&gt; </code></p>
<p>I am not getting the proper values in the column <b>COLUMN_VALUE</b>. Is this issue is due to Character set?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frequency Histograms &#8211; 6 &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2010/10/05/frequency-histogram-4/#comment-37571</link>
		<dc:creator><![CDATA[Frequency Histograms &#8211; 6 &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Wed, 20 Oct 2010 08:12:51 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4582#comment-37571</guid>
		<description><![CDATA[[...] under: Statistics,Troubleshooting,Tuning &#8212; Jonathan Lewis @ 6:01 pm UTC Oct 19,2010   In an earlier post on frequency histograms I described how Oracle creates an approximate histogram when dealing with character columns, and [...]]]></description>
		<content:encoded><![CDATA[<p>[...] under: Statistics,Troubleshooting,Tuning &#8212; Jonathan Lewis @ 6:01 pm UTC Oct 19,2010   In an earlier post on frequency histograms I described how Oracle creates an approximate histogram when dealing with character columns, and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frequency Histogram 5 &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2010/10/05/frequency-histogram-4/#comment-37527</link>
		<dc:creator><![CDATA[Frequency Histogram 5 &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Wed, 13 Oct 2010 09:23:05 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4582#comment-37527</guid>
		<description><![CDATA[[...] an earlier post on frequency histograms I described how Oracle creates an approximate histogram when dealing with character columns, and [...]]]></description>
		<content:encoded><![CDATA[<p>[...] an earlier post on frequency histograms I described how Oracle creates an approximate histogram when dealing with character columns, and [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
