<?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>topic Re: Bad performance and error execution of ST_Geometry fuctions in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/bad-performance-and-error-execution-of-st-geometry/m-p/277069#M15956</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you found the solution for the issue? I also encountered the error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Jan 2020 07:14:57 GMT</pubDate>
    <dc:creator>saizhang</dc:creator>
    <dc:date>2020-01-09T07:14:57Z</dc:date>
    <item>
      <title>Bad performance and error execution of ST_Geometry fuctions</title>
      <link>https://community.esri.com/t5/data-management-questions/bad-performance-and-error-execution-of-st-geometry/m-p/277068#M15955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am experimenting some performance problems and error executions when I use ST_GEOMETRY functions in SQL and&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I wanted to know how many features from my parcel layer intersect a required municipality. The parcel feature class is versioned and there are several versions created in our database. Using sql I wrote the following statement...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SELECT count(*)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; FROM GISADMIN.parcelario08 p,GISADMIN.municipios m&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; WHERE sde.st_intersects (p.shape,m.shape) = 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; AND m.municipios='VILLALBA'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; order by p.num_catastro;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this returns 7434 records in about just a few seconds. Using �??select by location�?� in ArcMap, the application returned 7436 selected features. Both queries were done relatively at the same time. I ran "exec sde.version_util.set_current_version('SDE.DEFAULT');" just in case in my latest tries, but still the same results. I figured out I was referencing the business table and not the corresponding versioned view so I modified the query to�?�&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SELECT count(*)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; FROM GISADMIN.parcelario08_evw p,GISADMIN.municipios m&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; WHERE sde.st_intersects (p.shape,m.shape) = 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; AND m.municipios='VILLALBA'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; order by p.num_catastro;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Problem is I�??m not able to confirm the results because querying the versioned view takes a lot of time and after several minutes I receive the error message�?�&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;�??Error starting at line 3 in command:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SELECT count(*)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; FROM GISADMIN.parcelario08_evw p,GISADMIN.municipios m&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; WHERE sde.st_intersects (p.shape,m.shape) = 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; AND m.municipios='VILLALBA'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; order by p.num_catastro&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error report:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SQL Error: ORA-20011: Error generating shape. (SHAPE1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 100&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ORA-06512: at "SDE.ST_RELATION_OPERATORS", line 340�?�&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another test was ran using another layer (non versioned) instead of the parcels fc and the performance is very bad (at the time this document is being edited, the oracle session is going for 30 minutes indicating the wait event �??External Procedure call�?�). I like using sql functionality to generate reports quickly and used to copy data to Postgis (no ESRI software) just to have this ability. In postgis the latter statement took just 2 seconds.&amp;nbsp; The gdb is compress and maintain daily.&amp;nbsp; After about 2 hours, I received the following errors�?� &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;�??ORA-29903: error in executing ODCIIndexFetch() routine&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ORA-28576: lost RPC connection to external procedure agent&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 933&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ORA-06512: at "SDE.SPX_UTIL", line 3954&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ORA-06512: at "SDE.SPX_UTIL", line 3832&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ORA-06512: at "SDE.ST_DOMAIN_METHODS", line 882&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;29903. 00000 -&amp;nbsp; "error in executing ODCIIndexFetch() routine"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;*Cause:&amp;nbsp;&amp;nbsp;&amp;nbsp; The execution of ODCIIndexFetch routine caused an error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;*Action:&amp;nbsp;&amp;nbsp; Examine the error messages produced by the indextype code and&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; take appropriate action.�?�&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found some bugs but in my oracle version are solve &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://support.esri.com/zh-cn/knowledgebase/techarticles/detail/38823"&gt;http://support.esri.com/zh-cn/knowledgebase/techarticles/detail/38823&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://support.esri.com/en/knowledgebase/techarticles/detail/32187"&gt;http://support.esri.com/en/knowledgebase/techarticles/detail/32187&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.palladiumconsulting.com/blog/sebastian/2008/05/sde-92s-stgeometry-part-zero.html"&gt;http://www.palladiumconsulting.com/blog/sebastian/2008/05/sde-92s-stgeometry-part-zero.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any one has any idea why is it? some recommendations?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Diego Llamas&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2014 12:59:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/bad-performance-and-error-execution-of-st-geometry/m-p/277068#M15955</guid>
      <dc:creator>DiegoLlamas</dc:creator>
      <dc:date>2014-02-07T12:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Bad performance and error execution of ST_Geometry fuctions</title>
      <link>https://community.esri.com/t5/data-management-questions/bad-performance-and-error-execution-of-st-geometry/m-p/277069#M15956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you found the solution for the issue? I also encountered the error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2020 07:14:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/bad-performance-and-error-execution-of-st-geometry/m-p/277069#M15956</guid>
      <dc:creator>saizhang</dc:creator>
      <dc:date>2020-01-09T07:14:57Z</dc:date>
    </item>
  </channel>
</rss>

