<?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 Disable caching in Serverless SQL Warehouse in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/disable-caching-in-serverless-sql-warehouse/m-p/105991#M42334</link>
    <description>&lt;P&gt;I have Serverless SQL Warehouse claster, and I run my sql code in sql editor. When I run query for the first time I see it take 30 secs total time, but all next time I see in query profiling that it gets result set from cache and takes 1-2 secs total time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even when I stop my serverless warehouse cluster and start it again it uses cache.&lt;/P&gt;&lt;P&gt;Even when I create totally new serverless sql warehouse cluster with a new name and cluster id it uses cache from the previous one.&lt;/P&gt;&lt;P&gt;My questions are:&lt;BR /&gt;1. Why&amp;nbsp;doesn't it clear the cache when I stop and start my serverless sql warehouse cluster ?&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;Why does it use&amp;nbsp;cache from the previous cluster , even when I&amp;nbsp; create totally new serverless sql warehouse cluster with a new name and cluster id?&lt;/P&gt;&lt;P&gt;3. Why doesn't work this setting&amp;nbsp;&lt;STRONG&gt;SET use_cached_result = false &lt;/STRONG&gt;on serverless sql warehouse cluster? And also I think it doesn't work on Classic and Pro I think.&lt;/P&gt;&lt;P&gt;4.&amp;nbsp;Is it possible somehow disable using cache in serverless sql warehouse cluster?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jan 2025 20:41:11 GMT</pubDate>
    <dc:creator>drag7ter</dc:creator>
    <dc:date>2025-01-16T20:41:11Z</dc:date>
    <item>
      <title>Disable caching in Serverless SQL Warehouse</title>
      <link>https://community.databricks.com/t5/data-engineering/disable-caching-in-serverless-sql-warehouse/m-p/105991#M42334</link>
      <description>&lt;P&gt;I have Serverless SQL Warehouse claster, and I run my sql code in sql editor. When I run query for the first time I see it take 30 secs total time, but all next time I see in query profiling that it gets result set from cache and takes 1-2 secs total time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even when I stop my serverless warehouse cluster and start it again it uses cache.&lt;/P&gt;&lt;P&gt;Even when I create totally new serverless sql warehouse cluster with a new name and cluster id it uses cache from the previous one.&lt;/P&gt;&lt;P&gt;My questions are:&lt;BR /&gt;1. Why&amp;nbsp;doesn't it clear the cache when I stop and start my serverless sql warehouse cluster ?&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;Why does it use&amp;nbsp;cache from the previous cluster , even when I&amp;nbsp; create totally new serverless sql warehouse cluster with a new name and cluster id?&lt;/P&gt;&lt;P&gt;3. Why doesn't work this setting&amp;nbsp;&lt;STRONG&gt;SET use_cached_result = false &lt;/STRONG&gt;on serverless sql warehouse cluster? And also I think it doesn't work on Classic and Pro I think.&lt;/P&gt;&lt;P&gt;4.&amp;nbsp;Is it possible somehow disable using cache in serverless sql warehouse cluster?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2025 20:41:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/disable-caching-in-serverless-sql-warehouse/m-p/105991#M42334</guid>
      <dc:creator>drag7ter</dc:creator>
      <dc:date>2025-01-16T20:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Disable caching in Serverless SQL Warehouse</title>
      <link>https://community.databricks.com/t5/data-engineering/disable-caching-in-serverless-sql-warehouse/m-p/106016#M42350</link>
      <description>&lt;UL class="simple"&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Remote result cache&lt;/STRONG&gt;: The remote result cache is a serverless-only cache system that retains query results by persisting them as workspace system data. As a result, this cache is not invalidated by the stopping or restarting of a SQL warehouse. Remote result cache addresses a common pain point in caching query results in-memory, which only remains available as long as the compute resources are running. The remote cache is a persistent shared cache across all warehouses in a Databricks workspace.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;A href="https://docs.databricks.com/en/sql/user/queries/query-caching.html" target="_blank"&gt;https://docs.databricks.com/en/sql/user/queries/query-caching.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 04:05:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/disable-caching-in-serverless-sql-warehouse/m-p/106016#M42350</guid>
      <dc:creator>NandiniN</dc:creator>
      <dc:date>2025-01-17T04:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Disable caching in Serverless SQL Warehouse</title>
      <link>https://community.databricks.com/t5/data-engineering/disable-caching-in-serverless-sql-warehouse/m-p/106017#M42351</link>
      <description>&lt;P&gt;&lt;SPAN&gt;4.&amp;nbsp;Is it possible somehow disable using cache in serverless sql warehouse cluster?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Remote result cache is available for queries using ODBC / JDBC clients and SQL Statement API.&lt;/P&gt;
&lt;P&gt;To disable query result caching, you can run&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="docutils literal notranslate"&gt;&lt;SPAN class="pre"&gt;SET&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="pre"&gt;use_cached_result&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="pre"&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="pre"&gt;false&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the SQL editor.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 04:05:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/disable-caching-in-serverless-sql-warehouse/m-p/106017#M42351</guid>
      <dc:creator>NandiniN</dc:creator>
      <dc:date>2025-01-17T04:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Disable caching in Serverless SQL Warehouse</title>
      <link>https://community.databricks.com/t5/data-engineering/disable-caching-in-serverless-sql-warehouse/m-p/106073#M42375</link>
      <description>&lt;P&gt;As I mentioned above this setting doesn't work for sql warehouse cluster&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;SET&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class=""&gt;use_cached_result&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class=""&gt;false&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 12:16:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/disable-caching-in-serverless-sql-warehouse/m-p/106073#M42375</guid>
      <dc:creator>drag7ter</dc:creator>
      <dc:date>2025-01-17T12:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Disable caching in Serverless SQL Warehouse</title>
      <link>https://community.databricks.com/t5/data-engineering/disable-caching-in-serverless-sql-warehouse/m-p/107046#M42685</link>
      <description>&lt;P&gt;I am wondering if it is using&amp;nbsp;&lt;STRONG&gt;Remote result cache,&amp;nbsp;&lt;/STRONG&gt;in that case the config should work.&lt;/P&gt;
&lt;P&gt;There are 4 types of cache mentioned here&amp;nbsp;&lt;A href="https://docs.databricks.com/en/sql/user/queries/query-caching.html#types-of-query-caches-in-databricks-sql" target="_blank"&gt;https://docs.databricks.com/en/sql/user/queries/query-caching.html#types-of-query-caches-in-databricks-sql&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Local cache&lt;/STRONG&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;once the cluster is stopped or restarted, the cache is cleaned and all query results are removed.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Databricks SQL UI cache&lt;/STRONG&gt;:&amp;nbsp;the cache is invalidated once the underlying tables have been updated.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can delete query results by re-running the query that you no longer want to be stored. Once re-run, the old query results are removed from cache.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Disk cache&lt;/STRONG&gt;&lt;SPAN&gt;:&amp;nbsp;stores data on disk, allowing for accelerated data reads.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;disk cache automatically detects changes to the underlying data files. When it detects changes, the cache is invalidated. The disk cache shares the same lifecycle characteristics as the local result cache. This means that when the cluster is stopped or restarted, the cache is cleaned and needs to be repopulated.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Even when I stop my serverless warehouse cluster and start it again it uses cache.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So, that only leaves us to&amp;nbsp;&lt;STRONG&gt;Remote result cache :&amp;nbsp;&lt;/STRONG&gt;persisting them as workspace system data. This cache is not invalidated by the stopping or restarting of a SQL warehouse.&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV class="gb5fhw2"&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-sql _1t7bu9hb hljs language-sql gb5fhw3"&gt;&lt;SPAN class="hljs-keyword"&gt;SET&lt;/SPAN&gt; use_cached_result &lt;SPAN class="hljs-operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="hljs-literal"&gt;false&lt;/SPAN&gt;;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="gb5fhw4"&gt;
&lt;DIV class=""&gt;
&lt;DIV class=" iwpqfy0"&gt;&lt;SPAN&gt;This command disables the query result caching for the&lt;STRONG&gt; current session.&amp;nbsp;&lt;/STRONG&gt;By any chance you are using it in a different session? If yes, before you run your command, set this.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=" iwpqfy0"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sun, 26 Jan 2025 07:44:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/disable-caching-in-serverless-sql-warehouse/m-p/107046#M42685</guid>
      <dc:creator>NandiniN</dc:creator>
      <dc:date>2025-01-26T07:44:47Z</dc:date>
    </item>
  </channel>
</rss>

