<?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 Oracle &amp;amp; ST_GEOMETRY: slow performance in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290629#M16631</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you taken a look at these documents?:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/content/kbase?fa=articleShow&amp;amp;d=32601"&gt;http://resources.arcgis.com/content/kbase?fa=articleShow&amp;amp;d=32601&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/content/kbase?fa=articleShow&amp;amp;d=33341"&gt;http://resources.arcgis.com/content/kbase?fa=articleShow&amp;amp;d=33341&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/content/kbase?fa=articleShow&amp;amp;d=33870"&gt;http://resources.arcgis.com/content/kbase?fa=articleShow&amp;amp;d=33870&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Sean&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Apr 2010 23:13:41 GMT</pubDate>
    <dc:creator>SeanGrant</dc:creator>
    <dc:date>2010-04-12T23:13:41Z</dc:date>
    <item>
      <title>Oracle &amp;amp; ST_GEOMETRY: slow performance</title>
      <link>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290626#M16628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everybody.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There was a post in the old ESRI Discussion Forums (&lt;/SPAN&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2291&amp;amp;t=297314"&gt;http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2291&amp;amp;t=297314&lt;/A&gt;&lt;SPAN&gt;) related to slow performance of ArcSDE with Oracle and ST_GEOMETRY feature classes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We also have the same problems described there. There was an user in this post, "T B", that seems to work at ESRI Inc., that wrote the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"I've started KB article 37468, "Oracle's optimizer uses a full table scan when executing a query against a st_geometry attribute" and will hopefully have this published before the year (2009) is over... "&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been searching for this KB but I haven't found it. "T B", if you read this message, please update us with more information about this problem and tell us if you finally wrote the KB that you were talking about.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Santiago Lastra.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Apr 2010 07:12:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290626#M16628</guid>
      <dc:creator>SantiagoLastra</dc:creator>
      <dc:date>2010-04-06T07:12:07Z</dc:date>
    </item>
    <item>
      <title>Oracle &amp; ST_GEOMETRY: slow performance</title>
      <link>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290627#M16629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi everybody.&lt;BR /&gt;There was a post in the old ESRI Discussion Forums (&lt;A href="http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2291&amp;amp;t=297314"&gt;http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2291&amp;amp;t=297314&lt;/A&gt;) related to slow performance of ArcSDE with Oracle and ST_GEOMETRY feature classes.&lt;BR /&gt;We also have the same problems described there. There was an user in this post, "T B", that seems to work at ESRI Inc., that wrote the following:&lt;BR /&gt;"I've started KB article 37468, "Oracle's optimizer uses a full table scan when executing a query against a st_geometry attribute" and will hopefully have this published before the year (2009) is over... "&lt;BR /&gt;I've been searching for this KB but I haven't found it. "T B", if you read this message, please update us with more information about this problem and tell us if you finally wrote the KB that you were talking about.&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;Santiago Lastra.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;slow performance in what sense?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We are using oracle sdo_geometry and havent noticed any slowness.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it slow when query data in catalog search tool or query one FClass or what?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Apr 2010 09:31:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290627#M16629</guid>
      <dc:creator>VaL</dc:creator>
      <dc:date>2010-04-06T09:31:55Z</dc:date>
    </item>
    <item>
      <title>Oracle &amp; ST_GEOMETRY: slow performance</title>
      <link>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290628#M16630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi&lt;BR /&gt;slow performance in what sense?&lt;BR /&gt;We are using oracle sdo_geometry and havent noticed any slowness.&lt;BR /&gt;Is it slow when query data in catalog search tool or query one FClass or what?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi, Garnet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can tell you that we have slow performance in nearly all senses, with ST_GEOMETRY not with SDO_GEOMETRY. We cannot move now to other storage scheme because we have developed an app with many ST functions and we really prefer not to do it. In the development environment everything worked well, but in the production environment (with much more and bigger data) all we get is slow performance. What I mean when I say "slow performance" is that we have an old system working (7 years old HW) with Oracle 8.1.7, ArcSDE 9.1, ArcIMS 9.1 and the performance is better that with new and better HW and with Oracle 10, ArcSDE 9.3.1, ArcGIS Server 9.3.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, the problem that we have is very well described in the following thread of the old ESRI forums:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2291&amp;amp;t=297314"&gt;http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2291&amp;amp;t=297314&lt;/A&gt;&lt;SPAN&gt;. The problem is that Oracle's optimizer uses a full table scan when executing a query against a st_geometry attribute, instead of using the spatial index.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally, what I'm looking for is the solution that "T B" said in the above thread. "T B" said that he was writing the KB article 37468, but I couldn't find it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Santiago Lastra&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Apr 2010 13:53:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290628#M16630</guid>
      <dc:creator>SantiagoLastra</dc:creator>
      <dc:date>2010-04-06T13:53:54Z</dc:date>
    </item>
    <item>
      <title>Oracle &amp; ST_GEOMETRY: slow performance</title>
      <link>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290629#M16631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you taken a look at these documents?:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/content/kbase?fa=articleShow&amp;amp;d=32601"&gt;http://resources.arcgis.com/content/kbase?fa=articleShow&amp;amp;d=32601&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/content/kbase?fa=articleShow&amp;amp;d=33341"&gt;http://resources.arcgis.com/content/kbase?fa=articleShow&amp;amp;d=33341&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/content/kbase?fa=articleShow&amp;amp;d=33870"&gt;http://resources.arcgis.com/content/kbase?fa=articleShow&amp;amp;d=33870&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Sean&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 23:13:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290629#M16631</guid>
      <dc:creator>SeanGrant</dc:creator>
      <dc:date>2010-04-12T23:13:41Z</dc:date>
    </item>
    <item>
      <title>Oracle &amp; ST_GEOMETRY: slow performance</title>
      <link>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290630#M16632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, Sean&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I read before two of the three links that you included. In my opinion, including a hint in the query is a good solution for queries defined in some search tools of my ArcGIS Server web applications but, for example, not for the navigation tools. We have slow performance even when we're navigating over the map (zoomin, zoomout, pan,...). As far as I understand, including an specific hint in the navigation tools for every layer suppose to modify the code of my web application whenever I add a new layer to the MXD map. Maybe I'm wrong, but I think this is the case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, the ESRI support representative in my country told me that this is a recognized bug by ESRI Inc., but their plans are to solve the problem in ArcSDE 9.4, not to issue a patch for ArcSDE 9.3.1. We began the project two years ago with ArcGIS 9.2, and because of many other performance problems we had to migrate to ArcGIS 9.3.1 (six months delay), and now, ¡¡¡ THE ONLY SOLUTION THAT ESRI GIVES ME IS TO MIGRATE AGAIN !!! Are they really fool? Do they think that my only work is to deal with ArcGIS software bugs? When ESRI supposes that I will put to work the system? Sorry for my comments about ESRI, but I needed to release some stress.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Santiago Lastra.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Apr 2010 06:11:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290630#M16632</guid>
      <dc:creator>SantiagoLastra</dc:creator>
      <dc:date>2010-04-15T06:11:13Z</dc:date>
    </item>
    <item>
      <title>Oracle &amp; ST_GEOMETRY: slow performance</title>
      <link>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290631#M16633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you have the service pack for 9.3.1 installed? I thought I heard that there were some performance improvements for ST geometry. Also have you recalculated you spatial index grids?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What version of Oracle are you running for your 9.3.1 instacne (10.2.0.4?)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Apr 2010 18:58:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290631#M16633</guid>
      <dc:creator>SeanGrant</dc:creator>
      <dc:date>2010-04-15T18:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle &amp; ST_GEOMETRY: slow performance</title>
      <link>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290632#M16634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We are having the same issues with slow downs - expecially utilizing dynamic segmentation on our roads layer in ST_GEOMETRY.&amp;nbsp; Also we are having slow downs using SDE vs direct connect.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any update from ESRI on these issues would be great.&amp;nbsp; We do not have a developemnt Oracle 11g 64 bit DB to test ArcSDE 10/ST_Geometry type to see if the "bugs" are fixed.&amp;nbsp; Frankly, they are not bugs, but PIA.&amp;nbsp; If this was a know issue why did ESRI switch to ST_GEOMETRY as the default for Oracle Databases.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Susan&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(my post on some of the issues we are having &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/19000-Citrix-slow-down-with-upgrade-Oracle-DB"&gt;http://forums.arcgis.com/threads/19000-Citrix-slow-down-with-upgrade-Oracle-DB&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2011 16:04:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290632#M16634</guid>
      <dc:creator>SusanMcclendon</dc:creator>
      <dc:date>2011-03-10T16:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle &amp; ST_GEOMETRY: slow performance</title>
      <link>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290633#M16635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Was KB 37468 ever written? I can't find it. And several threads ask about its existence. Is there a newer KB article number addressing the issue that supercedes it? The issue being setting the selectivity of the st_envintersects operator to prevent superfluous Full Table Scans on feature classes using ST_GEOMETRY as the shape type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Wanted to know what the current suggested solution is for ArcSDE 9.3.1. Also, we're running SDE 9.3.1 with no service packs. Do any service packs improve query performance for ST_GEOMETRY? Or do SDE 9.3.1 installations with the latest service pack suffer from the same FTS problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the following still the best workaround:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is what I'm recommending, instead of setting the num_rows = 0, please execute the following as the data owner - &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From post: &lt;/SPAN&gt;&lt;A href="http://forums.esri.com/thread.asp?c=158&amp;amp;f=2291&amp;amp;t=297314"&gt;http://forums.esri.com/thread.asp?c=158&amp;amp;f=2291&amp;amp;t=297314&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]DECLARE &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;CURSOR each_table IS &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SELECT table_name, column_name &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FROM sde.st_geometry_index &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;WHERE owner = USER; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BEGIN &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FOR each_row IN each_table LOOP &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sde.spx_util.set_operator_selectivity(user,each_row.table_name,each_row.column_name,'st_envintersects',.005); &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;END LOOP; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;END; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/ [/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, can the code above *only* be run as the data owner. As a SDE, I'd prefer to run it as my DBA account. I don't have the password for the data owner.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Further, the SQL being generated is "shrinkwrapped" SQL coming from ArcGIS Explorer 1500 (AGX). So the three KB articles sean4788 referenced above are of no use to us (meaning we can't open up Esri's binaries and force indexes to be used). Those KB articles seem useful only to those writing their own SQL queries and not having them auto-generate in an Esri client like AGX.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2011 11:08:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290633#M16635</guid>
      <dc:creator>danan</dc:creator>
      <dc:date>2011-03-23T11:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle &amp; ST_GEOMETRY: slow performance</title>
      <link>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290634#M16636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Santiago,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you considered that the performance differences yiou are seeing may be due to ArcIMS vs ArcGIS Server rendering and not the database at all?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The ArcIMS AXL render is significantly faster (although less extensive catographically) than ArcGIS Server. This is based on experience with ArcIMS/ArsGIS Server 9.2 and earlier.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nick&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2011 19:58:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290634#M16636</guid>
      <dc:creator>NickHarrison</dc:creator>
      <dc:date>2011-03-23T19:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle &amp; ST_GEOMETRY: slow performance</title>
      <link>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290635#M16637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you try this?&amp;nbsp; Did is solve the performance issues?&amp;nbsp; Did you ever get any confirmation from ESRI?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Susan&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Was KB 37468 ever written? I can't find it. And several threads ask about its existence. Is there a newer KB article number addressing the issue that supercedes it? The issue being setting the selectivity of the st_envintersects operator to prevent superfluous Full Table Scans on feature classes using ST_GEOMETRY as the shape type.&lt;BR /&gt;&lt;BR /&gt;Wanted to know what the current suggested solution is for ArcSDE 9.3.1. Also, we're running SDE 9.3.1 with no service packs. Do any service packs improve query performance for ST_GEOMETRY? Or do SDE 9.3.1 installations with the latest service pack suffer from the same FTS problem?&lt;BR /&gt;&lt;BR /&gt;Is the following still the best workaround:&lt;BR /&gt;&lt;BR /&gt;This is what I'm recommending, instead of setting the num_rows = 0, please execute the following as the data owner - &lt;BR /&gt;&lt;BR /&gt;From post: &lt;A href="http://forums.esri.com/thread.asp?c=158&amp;amp;f=2291&amp;amp;t=297314"&gt;http://forums.esri.com/thread.asp?c=158&amp;amp;f=2291&amp;amp;t=297314&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[INDENT]DECLARE &lt;BR /&gt;&lt;BR /&gt;CURSOR each_table IS &lt;BR /&gt;SELECT table_name, column_name &lt;BR /&gt;FROM sde.st_geometry_index &lt;BR /&gt;WHERE owner = USER; &lt;BR /&gt;&lt;BR /&gt;BEGIN &lt;BR /&gt;&lt;BR /&gt;FOR each_row IN each_table LOOP &lt;BR /&gt;&lt;BR /&gt;sde.spx_util.set_operator_selectivity(user,each_row.table_name,each_row.column_name,'st_envintersects',.005); &lt;BR /&gt;&lt;BR /&gt;END LOOP; &lt;BR /&gt;END; &lt;BR /&gt;/ [/INDENT]&lt;BR /&gt;&lt;BR /&gt;Also, can the code above *only* be run as the data owner. As a SDE, I'd prefer to run it as my DBA account. I don't have the password for the data owner.&lt;BR /&gt;&lt;BR /&gt;Further, the SQL being generated is "shrinkwrapped" SQL coming from ArcGIS Explorer 1500 (AGX). So the three KB articles sean4788 referenced above are of no use to us (meaning we can't open up Esri's binaries and force indexes to be used). Those KB articles seem useful only to those writing their own SQL queries and not having them auto-generate in an Esri client like AGX.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 16:10:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290635#M16637</guid>
      <dc:creator>SusanMcclendon</dc:creator>
      <dc:date>2011-07-28T16:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle &amp; ST_GEOMETRY: slow performance</title>
      <link>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290636#M16638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Did you try this?&amp;nbsp; Did is solve the performance issues?&amp;nbsp; Did you ever get any confirmation from ESRI?&lt;BR /&gt;Thanks,&lt;BR /&gt;Susan&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Susan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We ended-up following the instructions in KB 38019 per offline discussion with Esri. It solved our Full Table Scan issue. Very simple solution. And I believe it's what Esri would currently advise if you opened a support ticket. Don't think the other KB article (one referenced in some Oracle SDE presentations at past UCs--circa 2008?) was ever written.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Disassociate the st_domain_operators from the st_domain_stats type in Oracle&lt;/STRONG&gt;&lt;BR /&gt;&lt;A href="http://support.esri.com/en/knowledgebase/techarticles/detail/38019" rel="nofollow noopener noreferrer" target="_blank"&gt;http://support.esri.com/en/knowledgebase/techarticles/detail/38019&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;SQL&amp;gt; DISASSOCIATE STATISTICS FROM PACKAGES st_domain_operators;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First caveat: We applied the KB 38019 fix prior to applying SP 2 for 9.3.1. When we later applied SP 2 for 9.3.1 something funky happened. I believe stats were re-associated. And SP2 did not itself perform the DISASSOCIATE STATISTICS operation. SP2 for 9.3.1 is supposed to execute KB 38019 fix. I vaguely remember seeing the DISASSOCIATE STATISTICS SQL statement appear in a log file or standard output while applying SP2. The following is a separate issue, but applying SP 2 for 9.3.1 dropped all our SDE logfile tables. We had to recreate them by doing by executing sdeconfig and respecifying sde logfile parameters. Strange.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second caveat: I could be mistaken. But after this work around Oracle's CBO may always favor indexes regardless of the requested map extent (Or I may be confusing this with the workaround you quoted). That may be ok. Because people generally ought not, or ought not be allowed to, pan and zoom at full extents and small map scales (e.g. statewide). At least not with dynamic map services. Use scale dependencies in MXDs or MSDs to prevent inappropriate amounts of features to display in dynamic map services. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cached map services perform best for geographic orientation (finding your way to features whose attributes you *really* care about). Features you can do an Identify on should generally only appear at large map scales / tightly zoomed into extents. If you can't reasonably click on a map and return only one feature then you're probably displaying too many features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to get a copy of Jonathan Lewis' Cost-Based Oracle Fundamentals and do a Deeper Dive into Oracle's CBO. Would like to understand even more about what's going on under the hood. For anyone reading, is Cost-Based Oracle Fundamentals still the best book on Oracle's optimizer (for 10gR2 and 11gR2)?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:00:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/oracle-amp-amp-st-geometry-slow-performance/m-p/290636#M16638</guid>
      <dc:creator>danan</dc:creator>
      <dc:date>2021-12-11T14:00:56Z</dc:date>
    </item>
  </channel>
</rss>

