<?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 Enhance &amp;quot;CreateDatabaseView_management&amp;quot; with the option to create MATERIALIZED views in Data Management Ideas</title>
    <link>https://community.esri.com/t5/data-management-ideas/enhance-quot-createdatabaseview-management-quot/idi-p/928971</link>
    <description>&lt;P&gt;It would be really helpful if the &lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/create-database-view.htm" target="_blank" rel="noopener"&gt;CreateDatabaseView_management&lt;/A&gt; tool was enhanced with the option to create MATERIALIZED views instead of ordinary ones.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In many cases, ArcGIS &lt;STRONG&gt;Query Layers&lt;/STRONG&gt; may reference a view that has poor performance due to complex SQL. The only real solution for that is to materialize the view.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, once a view is created and referenced by a certain view name, it is no longer possible to modify the view by inserting the MATERIALIZE keyword in e.g. pgadmin in case of PostgreSQL, and save the view with the same name. PostgreSQL does not allow you to simply overwrite an existing view (you must DELETE first), even if you are the owner and exclusive user of the view or table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thus, instead, a new view must be created with a different name. The consequence of this is that any Query Layers referencing the original view needs updating of its data source.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For automation workflows using arcpy, it would therefor be very useful to have the ability to create a materialized view upon calling the &lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/create-database-view.htm" target="_blank" rel="noopener"&gt;CreateDatabaseView_management&lt;/A&gt; tool, e.g. via a new optional parameter setting, instead of having to reset data sources, or do a complex replacement including multiple DELETE and CREATE statements on the database side.&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;</description>
    <pubDate>Wed, 05 Oct 2022 23:59:13 GMT</pubDate>
    <dc:creator>MarcoBoeringa</dc:creator>
    <dc:date>2022-10-05T23:59:13Z</dc:date>
    <item>
      <title>Enhance "CreateDatabaseView_management" with the option to create MATERIALIZED views</title>
      <link>https://community.esri.com/t5/data-management-ideas/enhance-quot-createdatabaseview-management-quot/idi-p/928971</link>
      <description>&lt;P&gt;It would be really helpful if the &lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/create-database-view.htm" target="_blank" rel="noopener"&gt;CreateDatabaseView_management&lt;/A&gt; tool was enhanced with the option to create MATERIALIZED views instead of ordinary ones.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In many cases, ArcGIS &lt;STRONG&gt;Query Layers&lt;/STRONG&gt; may reference a view that has poor performance due to complex SQL. The only real solution for that is to materialize the view.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, once a view is created and referenced by a certain view name, it is no longer possible to modify the view by inserting the MATERIALIZE keyword in e.g. pgadmin in case of PostgreSQL, and save the view with the same name. PostgreSQL does not allow you to simply overwrite an existing view (you must DELETE first), even if you are the owner and exclusive user of the view or table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thus, instead, a new view must be created with a different name. The consequence of this is that any Query Layers referencing the original view needs updating of its data source.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For automation workflows using arcpy, it would therefor be very useful to have the ability to create a materialized view upon calling the &lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/create-database-view.htm" target="_blank" rel="noopener"&gt;CreateDatabaseView_management&lt;/A&gt; tool, e.g. via a new optional parameter setting, instead of having to reset data sources, or do a complex replacement including multiple DELETE and CREATE statements on the database side.&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Oct 2022 23:59:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-ideas/enhance-quot-createdatabaseview-management-quot/idi-p/928971</guid>
      <dc:creator>MarcoBoeringa</dc:creator>
      <dc:date>2022-10-05T23:59:13Z</dc:date>
    </item>
  </channel>
</rss>

