<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Query Cache &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/query-cache/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Mon, 25 Dec 2017 12:07:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>SQL Server 2014: Buffer Pool Extension to improve I/O throughput and Query Cache</title>
		<link>https://www.dbrnd.com/2018/01/sql-server-2014-buffer-pool-extension-to-improve-cpu-io-throughput-and-query-cache/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Mon, 15 Jan 2018 16:16:11 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[bpe file]]></category>
		<category><![CDATA[Buffer Pool Area]]></category>
		<category><![CDATA[buffer pool extension]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[memory cache]]></category>
		<category><![CDATA[procedure cache]]></category>
		<category><![CDATA[Query Cache]]></category>
		<category><![CDATA[solid-state drive]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Buffer]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[SSD Drive]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4266</guid>

					<description><![CDATA[<div><img width="679" height="452" src="https://www.dbrnd.com/wp-content/uploads/2017/12/SQL-RAM-Performance-679x452.jpg" class="attachment-post-image size-post-image wp-post-image" alt="SQL RAM Performance" decoding="async" fetchpriority="high" srcset="https://www.dbrnd.com/wp-content/uploads/2017/12/SQL-RAM-Performance-679x452.jpg 679w, https://www.dbrnd.com/wp-content/uploads/2017/12/SQL-RAM-Performance-850x566.jpg 850w, https://www.dbrnd.com/wp-content/uploads/2017/12/SQL-RAM-Performance.jpg 959w" sizes="(max-width: 679px) 100vw, 679px" /></div>SQL Server 2014 introduced Buffer Pool Extension to improve the performance of query cache which reduces the Disk I/O and increase the overall performance. This buffer pool area is a global resource shared by all databases, and it stores cache related information like frequently used data, frequently executed execution plans and pages information. The buffer [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="679" height="452" src="https://www.dbrnd.com/wp-content/uploads/2017/12/SQL-RAM-Performance-679x452.jpg" class="attachment-post-image size-post-image wp-post-image" alt="SQL RAM Performance" decoding="async" srcset="https://www.dbrnd.com/wp-content/uploads/2017/12/SQL-RAM-Performance-679x452.jpg 679w, https://www.dbrnd.com/wp-content/uploads/2017/12/SQL-RAM-Performance-850x566.jpg 850w, https://www.dbrnd.com/wp-content/uploads/2017/12/SQL-RAM-Performance.jpg 959w" sizes="(max-width: 679px) 100vw, 679px" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-buffer-pool-extension-to-improve-cpu-io-throughput-and-query-cache%2F&amp;linkname=SQL%20Server%202014%3A%20Buffer%20Pool%20Extension%20to%20improve%20I%2FO%20throughput%20and%20Query%20Cache" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-buffer-pool-extension-to-improve-cpu-io-throughput-and-query-cache%2F&amp;linkname=SQL%20Server%202014%3A%20Buffer%20Pool%20Extension%20to%20improve%20I%2FO%20throughput%20and%20Query%20Cache" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-buffer-pool-extension-to-improve-cpu-io-throughput-and-query-cache%2F&amp;linkname=SQL%20Server%202014%3A%20Buffer%20Pool%20Extension%20to%20improve%20I%2FO%20throughput%20and%20Query%20Cache" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-buffer-pool-extension-to-improve-cpu-io-throughput-and-query-cache%2F&amp;linkname=SQL%20Server%202014%3A%20Buffer%20Pool%20Extension%20to%20improve%20I%2FO%20throughput%20and%20Query%20Cache" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-buffer-pool-extension-to-improve-cpu-io-throughput-and-query-cache%2F&amp;linkname=SQL%20Server%202014%3A%20Buffer%20Pool%20Extension%20to%20improve%20I%2FO%20throughput%20and%20Query%20Cache" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-buffer-pool-extension-to-improve-cpu-io-throughput-and-query-cache%2F&amp;linkname=SQL%20Server%202014%3A%20Buffer%20Pool%20Extension%20to%20improve%20I%2FO%20throughput%20and%20Query%20Cache" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-buffer-pool-extension-to-improve-cpu-io-throughput-and-query-cache%2F&#038;title=SQL%20Server%202014%3A%20Buffer%20Pool%20Extension%20to%20improve%20I%2FO%20throughput%20and%20Query%20Cache" data-a2a-url="https://www.dbrnd.com/2018/01/sql-server-2014-buffer-pool-extension-to-improve-cpu-io-throughput-and-query-cache/" data-a2a-title="SQL Server 2014: Buffer Pool Extension to improve I/O throughput and Query Cache"></a></p><p>SQL Server 2014 introduced Buffer Pool Extension to improve the performance of query cache which reduces the Disk I/O and increase the overall performance.</p>
<blockquote><p>This buffer pool area is a global resource shared by all databases, and it stores cache related information like frequently used data, frequently executed execution plans and pages information.<img decoding="async" class="alignright wp-image-4270 size-full" title="SQL Server Buffer Extension" src="https://www.dbrnd.com/wp-content/uploads/2017/01/SQLServerBufferExtension.png" alt="SQLServerBufferExtension" width="256" height="256" srcset="https://www.dbrnd.com/wp-content/uploads/2017/01/SQLServerBufferExtension.png 256w, https://www.dbrnd.com/wp-content/uploads/2017/01/SQLServerBufferExtension-150x150.png 150w" sizes="(max-width: 256px) 100vw, 256px" /></p></blockquote>
<blockquote><p>The buffer pool area is a kind of memory cache which holds the frequently used result and returns the result from it rather than needing to go back to disk to retrieve the results.</p>
<p>The buffer pool is limited by the max server memory configuration option and the total available RAM.</p></blockquote>
<p><strong>Now using the concept of Buffer Pool Extension,</strong></p>
<blockquote><p>You can configure additional SSD disk to work as other buffer pool area. It doesn&#8217;t mean that you are increasing the RAM.</p>
<p>Why SSD (solid-state drive), because of it ten times faster than regular disk.</p>
<p>You should add SSD as buffer pool extension because with normal disk you will not get expected performance of the buffer pool.</p></blockquote>
<p><strong>What you should do?</strong></p>
<blockquote><p>Attached one SSD drive to the server and alter the server configuration parameter by adding the .bpe file. This BPE (Buffer Pool Extension) file works as an additional buffer pool area.</p></blockquote>
<blockquote><p>You just give to correct folder path of your SSD drive with .bpe filename and size, it automatically creates .bpe file with specified size.</p></blockquote>
<p><strong>Enable Buffer Pool Extenstion:</strong><br />
<pre class="crayon-plain-tag">USE master 
GO
ALTER SERVER CONFIGURATION 
SET BUFFER POOL EXTENSION ON
(FILENAME = 'F:\SQLData\SQL2014_dbrnd.BPE', SIZE = 30 GB);
GO</pre>
<p><strong>Disable Buffer Pool Extension:</strong><br />
<pre class="crayon-plain-tag">USE master 
GO
ALTER SERVER CONFIGURATION 
SET BUFFER POOL EXTENSION OFF;</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server: Don&#8217;t Enable Auto Close Database Option</title>
		<link>https://www.dbrnd.com/2017/02/sql-server-dont-enable-auto-close-database-option-use-cache-buffer-for-better-performance/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Mon, 20 Feb 2017 16:16:18 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[Auto_Close]]></category>
		<category><![CDATA[Buffer Cache]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[Query Cache]]></category>
		<category><![CDATA[Query Optimization]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4205</guid>

					<description><![CDATA[Microsoft SQL Server Database Auto Close option is also crucial during the performance tuning activities. When you set Auto_Close ON, SQL database automatically shut down after last user exit and free all the occupied resources. When a user wants to connect the database, it opens database related connections and starts utilizing resource again. This looks [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-dont-enable-auto-close-database-option-use-cache-buffer-for-better-performance%2F&amp;linkname=SQL%20Server%3A%20Don%E2%80%99t%20Enable%20Auto%20Close%20Database%20Option" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-dont-enable-auto-close-database-option-use-cache-buffer-for-better-performance%2F&amp;linkname=SQL%20Server%3A%20Don%E2%80%99t%20Enable%20Auto%20Close%20Database%20Option" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-dont-enable-auto-close-database-option-use-cache-buffer-for-better-performance%2F&amp;linkname=SQL%20Server%3A%20Don%E2%80%99t%20Enable%20Auto%20Close%20Database%20Option" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-dont-enable-auto-close-database-option-use-cache-buffer-for-better-performance%2F&amp;linkname=SQL%20Server%3A%20Don%E2%80%99t%20Enable%20Auto%20Close%20Database%20Option" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-dont-enable-auto-close-database-option-use-cache-buffer-for-better-performance%2F&amp;linkname=SQL%20Server%3A%20Don%E2%80%99t%20Enable%20Auto%20Close%20Database%20Option" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-dont-enable-auto-close-database-option-use-cache-buffer-for-better-performance%2F&amp;linkname=SQL%20Server%3A%20Don%E2%80%99t%20Enable%20Auto%20Close%20Database%20Option" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-dont-enable-auto-close-database-option-use-cache-buffer-for-better-performance%2F&#038;title=SQL%20Server%3A%20Don%E2%80%99t%20Enable%20Auto%20Close%20Database%20Option" data-a2a-url="https://www.dbrnd.com/2017/02/sql-server-dont-enable-auto-close-database-option-use-cache-buffer-for-better-performance/" data-a2a-title="SQL Server: Don’t Enable Auto Close Database Option"></a></p><p>Microsoft SQL Server Database Auto Close option is also crucial during the performance tuning activities.</p>
<blockquote><p>When you set Auto_Close ON, SQL database automatically shut down after last user exit and free all the occupied resources. When a user wants to connect the database, it opens database related connections and starts utilizing resource again. </p></blockquote>
<blockquote><p>This looks like a good thing where the database can free all the resources when they are not in use.
</p></blockquote>
<p>Please do not forget about query cache and other procedure cache areas which are playing an important role in query execution.</p>
<blockquote><p>If ou set Auto_Close ON, it removes all stored query cache, procedure cache, buffer cache which degrades the performance while accessing the database again. The biggest problem is that SQL Server has to load data back into the buffer to satisfy performance, and any queries fired against the database itself have to be re-compiled as well.</p></blockquote>
<blockquote><p>In very rare cases, you require to enable Auto Close for example, Your organization has thousand of databases and limited resources.<br />
In general, Database Auto Close option should disable which requires very limited resources in idle mode.</p></blockquote>
<p>So now, during your performance optimization activities, please check about Auto Close option. There are DMVs available to check the status of different types of cache data. </p>
<p><strong>Using SSMS, Set Auto Close OFF:</strong></p>
<pre class="crayon-plain-tag">Right-click on database -&gt; Properties -&gt; Options -&gt; Automatice Section -&gt; Auto Close</pre>
<strong>Using TSQL, Set AUTO_CLOSE OFF:</strong></p>
<pre class="crayon-plain-tag">USE [master]
GO
ALTER DATABASE [DatabaseName] SET AUTO_CLOSE OFF;
GO</pre> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>MySQL Query Cache Part II/II</title>
		<link>https://www.dbrnd.com/2015/08/mysql-query-cache-configuration/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sat, 08 Aug 2015 16:54:51 +0000</pubDate>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[have_query_cache]]></category>
		<category><![CDATA[MySQL Command]]></category>
		<category><![CDATA[MySQL Database Administrator]]></category>
		<category><![CDATA[MySQL Database Designing]]></category>
		<category><![CDATA[MySQL Database Programming]]></category>
		<category><![CDATA[MySQL Error]]></category>
		<category><![CDATA[MySQL Performance Tunning]]></category>
		<category><![CDATA[MySQL Query]]></category>
		<category><![CDATA[MySQL Tips and Tricks]]></category>
		<category><![CDATA[Query Cache]]></category>
		<category><![CDATA[query_cache_size]]></category>
		<category><![CDATA[query_cache_type]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=332</guid>

					<description><![CDATA[In the previous post, I shared a basic note on MySQL Query Cache. In this post, I am sharing the details on Query Cache configuration and monitoring. The first check, Query Cache is available or not. Please execute below SHOW command: [crayon-6ab55a8fa9fd6668603091/] To disable the query cache at server startup, set the query_cache_size system variable [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fmysql-query-cache-configuration%2F&amp;linkname=MySQL%20Query%20Cache%20Part%20II%2FII" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fmysql-query-cache-configuration%2F&amp;linkname=MySQL%20Query%20Cache%20Part%20II%2FII" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fmysql-query-cache-configuration%2F&amp;linkname=MySQL%20Query%20Cache%20Part%20II%2FII" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fmysql-query-cache-configuration%2F&amp;linkname=MySQL%20Query%20Cache%20Part%20II%2FII" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fmysql-query-cache-configuration%2F&amp;linkname=MySQL%20Query%20Cache%20Part%20II%2FII" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fmysql-query-cache-configuration%2F&amp;linkname=MySQL%20Query%20Cache%20Part%20II%2FII" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fmysql-query-cache-configuration%2F&#038;title=MySQL%20Query%20Cache%20Part%20II%2FII" data-a2a-url="https://www.dbrnd.com/2015/08/mysql-query-cache-configuration/" data-a2a-title="MySQL Query Cache Part II/II"></a></p><p>In the previous post, I shared a basic note on MySQL Query Cache.<br />
In this post, I am sharing the details on Query Cache configuration and monitoring. </p>
<p>The first check, Query Cache is available or not.</p>
<p><strong>Please execute below SHOW command:</strong></p>
<pre class="crayon-plain-tag">mysql&gt; SHOW VARIABLES LIKE 'have_query_cache';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| have_query_cache | YES   |
+------------------+-------+</pre>
<blockquote><p>To disable the query cache at server startup, set the <strong>query_cache_size</strong> system variable to 0. By default, the query cache is disabled.</p></blockquote>
<p>Using query_cache_size you can set the size of Query Cache which must be larger when you are planning to hold more data into Cache but again this is a task of analysis of your memory usage. </p>
<pre class="crayon-plain-tag">mysql&gt; SET GLOBAL query_cache_size = 1000000;
Query OK, 0 rows affected (0.04 sec)

mysql&gt; SHOW VARIABLES LIKE 'query_cache_size';
+------------------+--------+
| Variable_name    | Value  |
+------------------+--------+
| query_cache_size | 999424 |
+------------------+--------+
1 row in set (0.00 sec)</pre>
<p><strong>Query Cache with SELECT :</strong></p>
<pre class="crayon-plain-tag">SELECT SQL_CACHE * FROM tbl_users;
SELECT SQL_NO_CACHE * FROM tbl_users;</pre>
<p>In the above two select statements, you can find two identifiers.</p>
<p><strong>SQL_CACHE</strong></p>
<p>The query result is cached if it is cacheable and the value of the query_cache_type system variable is ON or DEMAND.</p>
<p><strong>SQL_NO_CACHE</strong></p>
<p>The server does not use the query cache. It neither checks the query cache to see whether the result is already cached nor does it cache the query result.</p>
<pre class="crayon-plain-tag">SHOW VARIABLES LIKE 'query_cache_type';</pre>
Using query_cache_type you can set the type of query cache. It should be ON, OFF or DEMAND.</p>
<ul>
<li>A value of 0 or OFF prevents caching or retrieval of cached results.</li>
<li>A value of 1 or ON enables caching except of those statements that begin with SELECT SQL_NO_CACHE.</li>
<li>A value of 2 or DEMAND causes caching of only those statements that begin with SELECT SQL_CACHE.</li>
</ul>
<p><strong>To monitor query cache performance, use SHOW STATUS to view the cache status variables:</strong></p>
<pre class="crayon-plain-tag">mysql&gt; SHOW STATUS LIKE 'Qcache%';
+-------------------------+--------+
| Variable_name           | Value  |
+-------------------------+--------+
| Qcache_free_blocks      | 36     |
| Qcache_free_memory      | 138488 |
| Qcache_hits             | 79570  |
| Qcache_inserts          | 27087  |
| Qcache_lowmem_prunes    | 3114   |
| Qcache_not_cached       | 22989  |
| Qcache_queries_in_cache | 415    |
| Qcache_total_blocks     | 912    |
+-------------------------+--------+</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>MySQL Query Cache Part I/II</title>
		<link>https://www.dbrnd.com/2015/08/mysql-query-cache/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sat, 08 Aug 2015 12:06:49 +0000</pubDate>
				<category><![CDATA[Database Theory]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[MySQL Command]]></category>
		<category><![CDATA[MySQL Database Administrator]]></category>
		<category><![CDATA[MySQL Database Designing]]></category>
		<category><![CDATA[MySQL Database Programming]]></category>
		<category><![CDATA[MySQL Error]]></category>
		<category><![CDATA[MySQL Performance Tunning]]></category>
		<category><![CDATA[MySQL Query]]></category>
		<category><![CDATA[MySQL Tips and Tricks]]></category>
		<category><![CDATA[Query Cache]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=325</guid>

					<description><![CDATA[Introduction to MySQL Query Cache: Part I Today morning, I was monitoring MySQL Production database. I found out the list of running sessions with different SQL queries. I created some master and primary tables in MySQL which stored settings and configuration data for one of our Mobile App. As these tables are for configuration purpose [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fmysql-query-cache%2F&amp;linkname=MySQL%20Query%20Cache%20Part%20I%2FII" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fmysql-query-cache%2F&amp;linkname=MySQL%20Query%20Cache%20Part%20I%2FII" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fmysql-query-cache%2F&amp;linkname=MySQL%20Query%20Cache%20Part%20I%2FII" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fmysql-query-cache%2F&amp;linkname=MySQL%20Query%20Cache%20Part%20I%2FII" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fmysql-query-cache%2F&amp;linkname=MySQL%20Query%20Cache%20Part%20I%2FII" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fmysql-query-cache%2F&amp;linkname=MySQL%20Query%20Cache%20Part%20I%2FII" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fmysql-query-cache%2F&#038;title=MySQL%20Query%20Cache%20Part%20I%2FII" data-a2a-url="https://www.dbrnd.com/2015/08/mysql-query-cache/" data-a2a-title="MySQL Query Cache Part I/II"></a></p><p><strong>Introduction to MySQL Query Cache: Part I</strong></p>
<p>Today morning, I was monitoring MySQL Production database.</p>
<p>I found out the list of running sessions with different SQL queries. I created some master and primary tables in MySQL which stored settings and configuration data for one of our Mobile App.</p>
<blockquote><p>As these tables are for configuration purpose so not frequently update by the application.</p>
<p>But today, I was worry because of this configuration table was utilizing more CPU I/O. I created this all tables under InnoDB MySQL Storage engine.</p>
<p>I cannot store all this data under Memory engine because this all are primary data for our Application.</p></blockquote>
<p>So I was finding a solution for faster retrieval and found that MySQL has a good option called a Query Cache.</p>
<p>In this post, I am sharing theory of MySQL Query Cache and I will share the second part of the practical configuration of MySQL Query Cache by tomorrow. </p>
<blockquote><p><strong>What is MySQL Query Cache ?</strong><br />
Sort &amp; Simple, MySQL Query Cache stores some frequent SELECT statements with its corresponding results.</p>
<p>When table data are not changing frequently and the server receives many identical queries then only Query Cache returns data from the Cache area. </p>
<p>Whenever table modified with data, then Query cache will be flush.</p></blockquote>
<p>I surprised by this feature of MySQL which improve your query performance in some circumstances.</p>
<blockquote><p>
When you trigger any select statement and if it is available in the cache, it will return from there and not require parsing and fetching from disk so it improves a query performance.</p></blockquote>
<p>Please do not assume that this will work under all circumstances because this also depends on your load of memory and server.</p>
<p>You can also set the size for Query Cache but make sure that it should not be higher otherwise its create memory overhead for the whole server.</p>
<p><strong>Few conditions in which Query Cache will not work:</strong></p>
<ul>
<li>Not use when multiple server hitting to one query.</li>
<li>Not use with Stored Procedure and UDF.</li>
<li>Not use with any type of Variables.</li>
<li>Not use with any table of default database like, MySQL, INFORMATION_SCHEMA.</li>
<li>Not use with partition tables.</li>
<li>Not use with Temporary tables.</li>
<li>Not use with Prepared Statements.</li>
</ul>
<p><a href="https://www.dbrnd.com/2015/08/mysql-query-cache-configuration/">Please visit MySQL Query Cache Part II for the configuration of Query Cache:</a></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
