<?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 Spatial Join with st_geometry in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/spatial-join-with-st-geometry/m-p/1266797#M8323</link>
    <description>&lt;P&gt;I would like to do a spatial join between points and polygons with st_geometry this is what I have come up with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;select sp.OBJECTID, p.parcel_num from servicepoint_evw sp
join parcels p
on (sde.st_intersects(sp.shape, p.shape)) = 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This does appear to work but it is supper slow... I took over a minute to return one row.&lt;/P&gt;</description>
    <pubDate>Sat, 11 Mar 2023 01:35:40 GMT</pubDate>
    <dc:creator>forestknutsen1</dc:creator>
    <dc:date>2023-03-11T01:35:40Z</dc:date>
    <item>
      <title>Spatial Join with st_geometry</title>
      <link>https://community.esri.com/t5/geodatabase-questions/spatial-join-with-st-geometry/m-p/1266797#M8323</link>
      <description>&lt;P&gt;I would like to do a spatial join between points and polygons with st_geometry this is what I have come up with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;select sp.OBJECTID, p.parcel_num from servicepoint_evw sp
join parcels p
on (sde.st_intersects(sp.shape, p.shape)) = 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This does appear to work but it is supper slow... I took over a minute to return one row.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Mar 2023 01:35:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/spatial-join-with-st-geometry/m-p/1266797#M8323</guid>
      <dc:creator>forestknutsen1</dc:creator>
      <dc:date>2023-03-11T01:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join with st_geometry</title>
      <link>https://community.esri.com/t5/geodatabase-questions/spatial-join-with-st-geometry/m-p/1266818#M8325</link>
      <description>&lt;P&gt;How big is the dataset?&amp;nbsp; One thing to check is that you have a spatial index, it is much faster if so.&amp;nbsp; Maybe the 'disjoint' test is faster.&lt;/P&gt;&lt;P&gt;When was the last time the database was compressed (I'm guessing versioned as you have _evw)?&amp;nbsp; Is it going to state 1 or 0?&amp;nbsp; Otherwise the versioned view query is quite expensive to work through - checking on the delta tables and the base table differences.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Mar 2023 12:18:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/spatial-join-with-st-geometry/m-p/1266818#M8325</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2023-03-11T12:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join with st_geometry</title>
      <link>https://community.esri.com/t5/geodatabase-questions/spatial-join-with-st-geometry/m-p/1267218#M8328</link>
      <description>&lt;OL&gt;&lt;LI&gt;yes, it has a spatial index&lt;/LI&gt;&lt;LI&gt;yes, we are versioned and no we never get back a low state count and we do have a large number of delta rows. So this could be the issue. (and yes we know this is a problem... I will spare you the details)&lt;/LI&gt;&lt;LI&gt;I will give disjoint a try&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thanks for the feedback&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 18:18:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/spatial-join-with-st-geometry/m-p/1267218#M8328</guid>
      <dc:creator>forestknutsen1</dc:creator>
      <dc:date>2023-03-13T18:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join with st_geometry</title>
      <link>https://community.esri.com/t5/geodatabase-questions/spatial-join-with-st-geometry/m-p/1267227#M8330</link>
      <description>&lt;P&gt;Might also be worth testing against the base table rather than evw to confirm this as the likely cause of the inefficiency (appreciate record count would differ however).&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 18:28:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/spatial-join-with-st-geometry/m-p/1267227#M8330</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2023-03-13T18:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join with st_geometry</title>
      <link>https://community.esri.com/t5/geodatabase-questions/spatial-join-with-st-geometry/m-p/1267303#M8332</link>
      <description>&lt;P&gt;That is a great idea. I just did it against the base table and it is only 10% faster. So, the versioning is playing a role. But it is not the main issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 21:04:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/spatial-join-with-st-geometry/m-p/1267303#M8332</guid>
      <dc:creator>forestknutsen1</dc:creator>
      <dc:date>2023-03-13T21:04:47Z</dc:date>
    </item>
  </channel>
</rss>

