<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>idea Update Oracle GDB docs: EXTRACTVALUE is deprecated, use XMLTABLE instead (faster) in Data Management Ideas</title>
    <link>https://community.esri.com/t5/data-management-ideas/update-oracle-gdb-docs-extractvalue-is-deprecated/idi-p/1187342</link>
    <description>&lt;P&gt;Oracle enterprise GDBs:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The enterprise &lt;A href="https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/example-resolving-domain-codes-to-description-values.htm" target="_self"&gt;GDB system table docs&lt;/A&gt; tell us to use the Oracle&amp;nbsp;&lt;SPAN&gt;EXTRACTVALUE function when extracting GDB system table data via SQL.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But it looks like EXTRACTVALUE has been deprecated:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;A href="https://docs.oracle.com/cd/E11882_01/server.112/e41084/functions061.htm#SQLRF06173" target="_self"&gt;&lt;SPAN&gt;Oracle 11g R2 docs:&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The EXTRACTVALUE function is deprecated. It is still supported for backward compatibility. However, Oracle recommends that you use the XMLTABLE function, or the XMLCAST and XMLQUERY functions instead.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;11g R2 release date: 2009&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;EXTRACTVALUE vs XMLTABLE&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Speed comparison:&lt;/STRONG&gt; (Oracle 18c)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Select domain codes/descriptions using EXTRACTVALUE (the old way):&lt;/P&gt;&lt;PRE&gt;--Source: https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/example-resolving-domain-codes-to-description-values.htm&lt;BR /&gt;select&lt;BR /&gt;    extractvalue(codedvalues.column_value,'CodedValue/Code') as domain_code,&lt;BR /&gt;    extractvalue(codedvalues.column_value,'CodedValue/Name') as domain_description&lt;BR /&gt;from&lt;BR /&gt;    sde.gdb_items_vw items&lt;BR /&gt;cross join &lt;BR /&gt;    xmlsequence(xmltype(definition).extract('/GPCodedValueDomain2/CodedValues/CodedValue')) codedvalues&lt;BR /&gt;where&lt;BR /&gt;    items.name is not null&lt;/PRE&gt;&lt;P&gt;Time: 10 seconds.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Select domain codes/descriptions using XMLTABLE (the new way):&lt;/P&gt;&lt;PRE&gt;select      
    i.name as domain_name,
    x.code,
    x.description
from        
    sde.gdb_items_vw i
cross apply xmltable(
    '/GPCodedValueDomain2/CodedValues/CodedValue' 
    passing xmltype(i.definition)
    columns
        code        varchar2(255) path './Code',
        description varchar2(255) path './Name'
    ) x    
where      
     i.name is not null&lt;/PRE&gt;&lt;P&gt;Time: 5 seconds (twice as fast).&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;STRONG&gt;Idea:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Since EXTRACTVALUE was deprecated in ~2009, and since XMLTABLE is twice as fast, could the docs be updated to use XMLTABLE?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Related:&amp;nbsp;&lt;A href="https://www.igorkromin.net/index.php/2016/03/15/oracle-database-xmltable-vs-extractvalue-performance/" target="_self"&gt;Oracle Database XMLTable vs ExtractValue performance&lt;/A&gt;&lt;BR /&gt;&lt;EM&gt;"...The SQL execution time was 4.5 times faster after switching to XMLTABLE."&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 09 Jul 2022 12:37:54 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2022-07-09T12:37:54Z</dc:date>
    <item>
      <title>Update Oracle GDB docs: EXTRACTVALUE is deprecated, use XMLTABLE instead (faster)</title>
      <link>https://community.esri.com/t5/data-management-ideas/update-oracle-gdb-docs-extractvalue-is-deprecated/idi-p/1187342</link>
      <description>&lt;P&gt;Oracle enterprise GDBs:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The enterprise &lt;A href="https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/example-resolving-domain-codes-to-description-values.htm" target="_self"&gt;GDB system table docs&lt;/A&gt; tell us to use the Oracle&amp;nbsp;&lt;SPAN&gt;EXTRACTVALUE function when extracting GDB system table data via SQL.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But it looks like EXTRACTVALUE has been deprecated:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;A href="https://docs.oracle.com/cd/E11882_01/server.112/e41084/functions061.htm#SQLRF06173" target="_self"&gt;&lt;SPAN&gt;Oracle 11g R2 docs:&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The EXTRACTVALUE function is deprecated. It is still supported for backward compatibility. However, Oracle recommends that you use the XMLTABLE function, or the XMLCAST and XMLQUERY functions instead.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;11g R2 release date: 2009&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;EXTRACTVALUE vs XMLTABLE&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Speed comparison:&lt;/STRONG&gt; (Oracle 18c)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Select domain codes/descriptions using EXTRACTVALUE (the old way):&lt;/P&gt;&lt;PRE&gt;--Source: https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/example-resolving-domain-codes-to-description-values.htm&lt;BR /&gt;select&lt;BR /&gt;    extractvalue(codedvalues.column_value,'CodedValue/Code') as domain_code,&lt;BR /&gt;    extractvalue(codedvalues.column_value,'CodedValue/Name') as domain_description&lt;BR /&gt;from&lt;BR /&gt;    sde.gdb_items_vw items&lt;BR /&gt;cross join &lt;BR /&gt;    xmlsequence(xmltype(definition).extract('/GPCodedValueDomain2/CodedValues/CodedValue')) codedvalues&lt;BR /&gt;where&lt;BR /&gt;    items.name is not null&lt;/PRE&gt;&lt;P&gt;Time: 10 seconds.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Select domain codes/descriptions using XMLTABLE (the new way):&lt;/P&gt;&lt;PRE&gt;select      
    i.name as domain_name,
    x.code,
    x.description
from        
    sde.gdb_items_vw i
cross apply xmltable(
    '/GPCodedValueDomain2/CodedValues/CodedValue' 
    passing xmltype(i.definition)
    columns
        code        varchar2(255) path './Code',
        description varchar2(255) path './Name'
    ) x    
where      
     i.name is not null&lt;/PRE&gt;&lt;P&gt;Time: 5 seconds (twice as fast).&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;STRONG&gt;Idea:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Since EXTRACTVALUE was deprecated in ~2009, and since XMLTABLE is twice as fast, could the docs be updated to use XMLTABLE?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Related:&amp;nbsp;&lt;A href="https://www.igorkromin.net/index.php/2016/03/15/oracle-database-xmltable-vs-extractvalue-performance/" target="_self"&gt;Oracle Database XMLTable vs ExtractValue performance&lt;/A&gt;&lt;BR /&gt;&lt;EM&gt;"...The SQL execution time was 4.5 times faster after switching to XMLTABLE."&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jul 2022 12:37:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-ideas/update-oracle-gdb-docs-extractvalue-is-deprecated/idi-p/1187342</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2022-07-09T12:37:54Z</dc:date>
    </item>
  </channel>
</rss>

