<?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 How to optimize speed of a select query in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/how-to-optimize-speed-of-a-select-query/m-p/764501#M604</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;The issue I am having is that when I run a query using the Esri ST_Geometry package it is&lt;/DIV&gt;&lt;DIV&gt;taking up to 5 minutes to give a result. It is possible that it may be because&lt;/DIV&gt;&lt;DIV&gt;of the large number of records in the view.&lt;/DIV&gt;&lt;DIV&gt;Below is an example of the query I am running:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&lt;EM&gt;select sectionnumber from land.fisgridsection_vw&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&lt;EM&gt;where sde.st_overlaps(sde.st_buffer(&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&lt;EM&gt;(SELECT shape FROM land.fisgridsection_vw&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&lt;EM&gt;WHERE sde.st_intersects(sde.st_point(792026,335093,2274),shape) = 1),1),shape)= 1;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;My question is "how can I optimize the speed of this query?"&amp;nbsp;Are there any other options&lt;/DIV&gt;&lt;DIV&gt;I could use?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Oct 2018 20:40:04 GMT</pubDate>
    <dc:creator>ShaniquaRayford</dc:creator>
    <dc:date>2018-10-11T20:40:04Z</dc:date>
    <item>
      <title>How to optimize speed of a select query</title>
      <link>https://community.esri.com/t5/geodatabase-questions/how-to-optimize-speed-of-a-select-query/m-p/764501#M604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;The issue I am having is that when I run a query using the Esri ST_Geometry package it is&lt;/DIV&gt;&lt;DIV&gt;taking up to 5 minutes to give a result. It is possible that it may be because&lt;/DIV&gt;&lt;DIV&gt;of the large number of records in the view.&lt;/DIV&gt;&lt;DIV&gt;Below is an example of the query I am running:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&lt;EM&gt;select sectionnumber from land.fisgridsection_vw&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&lt;EM&gt;where sde.st_overlaps(sde.st_buffer(&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&lt;EM&gt;(SELECT shape FROM land.fisgridsection_vw&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&lt;EM&gt;WHERE sde.st_intersects(sde.st_point(792026,335093,2274),shape) = 1),1),shape)= 1;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;My question is "how can I optimize the speed of this query?"&amp;nbsp;Are there any other options&lt;/DIV&gt;&lt;DIV&gt;I could use?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 20:40:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/how-to-optimize-speed-of-a-select-query/m-p/764501#M604</guid>
      <dc:creator>ShaniquaRayford</dc:creator>
      <dc:date>2018-10-11T20:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to optimize speed of a select query</title>
      <link>https://community.esri.com/t5/geodatabase-questions/how-to-optimize-speed-of-a-select-query/m-p/764502#M605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Honestly, it is really difficult to troubleshoot performance issues like this in the forums unless you can provide a whole lot more information about the data, SQL execution plans, etc....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since this involves multiple spatial operations, have you broken the problem down to see at which step the execution time increases the most?&amp;nbsp; For example, how long does it take for:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;SELECT&lt;/SPAN&gt; shape &lt;SPAN class="keyword token"&gt;FROM&lt;/SPAN&gt; land&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;fisgridsection_vw
&lt;SPAN class="keyword token"&gt;WHERE&lt;/SPAN&gt; sde&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;st_intersects&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sde&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;st_point&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;792026&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;335093&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2274&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;shape&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;a&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:28:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/how-to-optimize-speed-of-a-select-query/m-p/764502#M605</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-12T08:28:22Z</dc:date>
    </item>
  </channel>
</rss>

