<?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/"
		>
<channel>
	<title>Comments on: Oracle File Extent Map, the Old-Fashioned Way</title>
	<atom:link href="http://www.pythian.com/news/563/oracle-file-extent-map-the-old-fashioned-way/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pythian.com/news/563/oracle-file-extent-map-the-old-fashioned-way/</link>
	<description>News and views from Pythian DBAs</description>
	<lastBuildDate>Fri, 10 Feb 2012 13:01:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: Marc Billette</title>
		<link>http://www.pythian.com/news/563/oracle-file-extent-map-the-old-fashioned-way/#comment-672283</link>
		<dc:creator>Marc Billette</dc:creator>
		<pubDate>Wed, 14 Dec 2011 19:26:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/563/oracle-file-extent-map-the-old-fashioned-way#comment-672283</guid>
		<description>Glad to hear it was useful to you Willem :)

Have a great day!</description>
		<content:encoded><![CDATA[<p>Glad to hear it was useful to you Willem :)</p>
<p>Have a great day!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Willem</title>
		<link>http://www.pythian.com/news/563/oracle-file-extent-map-the-old-fashioned-way/#comment-672187</link>
		<dc:creator>Willem</dc:creator>
		<pubDate>Wed, 14 Dec 2011 17:33:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/563/oracle-file-extent-map-the-old-fashioned-way#comment-672187</guid>
		<description>Thank you for sharing Marc.

Your work helped me to answer to some really tough questions.</description>
		<content:encoded><![CDATA[<p>Thank you for sharing Marc.</p>
<p>Your work helped me to answer to some really tough questions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc</title>
		<link>http://www.pythian.com/news/563/oracle-file-extent-map-the-old-fashioned-way/#comment-83160</link>
		<dc:creator>Marc</dc:creator>
		<pubDate>Wed, 08 Aug 2007 20:15:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/563/oracle-file-extent-map-the-old-fashioned-way#comment-83160</guid>
		<description>I&#039;ve come across a limitation of the sys_connect_by_path function which may make the insert into aggregated_extent_map fail on an &quot;ORA-01489: result of string concatenation is too long&quot;. The solution to that is simple but will only work with 10G and above. Simply replace the expression for the &quot;root&quot; column by &quot;connect_by_root block_id root&quot;. 

Here&#039;s the full statement (hope this preserves the formatting):

insert into aggregated_extent_map
select file_id, root, owner, segment_name, segment_type,
       sum(blocks)
  from
(
select owner, segment_name, segment_type, file_id,
       blocks, block_id,
       connect_by_root block_id root
  from seg_list a
 start with (file_id, block_id) in
            (select file_id, block_id
              from seg_list
             where (file_id,block_id) in
                   (select file_id, min(block_id)
                      from seg_list group by file_id)
            union all
            select b.file_id, b.block_id
              from seg_list a, seg_list b
             where b.block_id = a.block_id + a.blocks
               and a.file_id = b.file_id
               and (a.owner  b.owner or
                    a.segment_name  b.segment_name)
           )
connect by owner = prior owner
       and segment_name = prior segment_name
       and file_id = prior file_id
       and block_id = prior a.block_id + prior a.blocks
) c
group by owner, segment_name, segment_type, file_id, root
;
</description>
		<content:encoded><![CDATA[<p>I&#8217;ve come across a limitation of the sys_connect_by_path function which may make the insert into aggregated_extent_map fail on an &#8220;ORA-01489: result of string concatenation is too long&#8221;. The solution to that is simple but will only work with 10G and above. Simply replace the expression for the &#8220;root&#8221; column by &#8220;connect_by_root block_id root&#8221;. </p>
<p>Here&#8217;s the full statement (hope this preserves the formatting):</p>
<p>insert into aggregated_extent_map<br />
select file_id, root, owner, segment_name, segment_type,<br />
       sum(blocks)<br />
  from<br />
(<br />
select owner, segment_name, segment_type, file_id,<br />
       blocks, block_id,<br />
       connect_by_root block_id root<br />
  from seg_list a<br />
 start with (file_id, block_id) in<br />
            (select file_id, block_id<br />
              from seg_list<br />
             where (file_id,block_id) in<br />
                   (select file_id, min(block_id)<br />
                      from seg_list group by file_id)<br />
            union all<br />
            select b.file_id, b.block_id<br />
              from seg_list a, seg_list b<br />
             where b.block_id = a.block_id + a.blocks<br />
               and a.file_id = b.file_id<br />
               and (a.owner  b.owner or<br />
                    a.segment_name  b.segment_name)<br />
           )<br />
connect by owner = prior owner<br />
       and segment_name = prior segment_name<br />
       and file_id = prior file_id<br />
       and block_id = prior a.block_id + prior a.blocks<br />
) c<br />
group by owner, segment_name, segment_type, file_id, root<br />
;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marco Gralike</title>
		<link>http://www.pythian.com/news/563/oracle-file-extent-map-the-old-fashioned-way/#comment-80532</link>
		<dc:creator>Marco Gralike</dc:creator>
		<pubDate>Tue, 31 Jul 2007 09:58:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/563/oracle-file-extent-map-the-old-fashioned-way#comment-80532</guid>
		<description>Very nice job ! 
Great groundwork.</description>
		<content:encoded><![CDATA[<p>Very nice job !<br />
Great groundwork.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

