<?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>Cache &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/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, 20 Nov 2017 05:57:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>SQL Server: Database Developer (T-SQL) Interview Questions and Answers (Day-10)</title>
		<link>https://www.dbrnd.com/2016/06/sql-server-database-developer-t-sql-interview-questions-and-answers-msdtc-parameter-sniffing-sql_variant-throw-raiseerror-day-10/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Tue, 21 Jun 2016 19:51:08 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[char]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Database Developer]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[int]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[NVARCHAR]]></category>
		<category><![CDATA[Parameter Sniffing]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[raiseerror]]></category>
		<category><![CDATA[smallint]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></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[sql_variant]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[throw]]></category>
		<category><![CDATA[TSQL]]></category>
		<category><![CDATA[VARCHAR]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3063</guid>

					<description><![CDATA[What is the difference between Varchar and NVarchar data type? varchar: Variable-length, non-Unicode character data. The database collation determines which code page the data is stored using. nvarchar: Variable-length Unicode character data. Dependent on the database collation for comparisons. Essentially, NVARCHAR is nothing more than a VARCHAR that supports two-byte characters. The most common use [&#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%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-msdtc-parameter-sniffing-sql_variant-throw-raiseerror-day-10%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-10%29" 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%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-msdtc-parameter-sniffing-sql_variant-throw-raiseerror-day-10%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-10%29" 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%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-msdtc-parameter-sniffing-sql_variant-throw-raiseerror-day-10%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-10%29" 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%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-msdtc-parameter-sniffing-sql_variant-throw-raiseerror-day-10%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-10%29" 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%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-msdtc-parameter-sniffing-sql_variant-throw-raiseerror-day-10%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-10%29" 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%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-msdtc-parameter-sniffing-sql_variant-throw-raiseerror-day-10%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-10%29" 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%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-msdtc-parameter-sniffing-sql_variant-throw-raiseerror-day-10%2F&#038;title=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-10%29" data-a2a-url="https://www.dbrnd.com/2016/06/sql-server-database-developer-t-sql-interview-questions-and-answers-msdtc-parameter-sniffing-sql_variant-throw-raiseerror-day-10/" data-a2a-title="SQL Server: Database Developer (T-SQL) Interview Questions and Answers (Day-10)"></a></p><p><strong>What is the difference between Varchar and NVarchar data type?</strong></p>
<blockquote><p>varchar: Variable-length, non-Unicode character data. The database collation determines which code page the data is stored using.</p>
<p>nvarchar: Variable-length Unicode character data. Dependent on the database collation for comparisons.</p>
<p>Essentially, NVARCHAR is nothing more than a VARCHAR that supports two-byte characters. The most common use for this sort of thing is to store character data that is a mixture of English and non-English symbols.</p>
<p>The key difference between the two data types is how they&#8217;re stored.</p></blockquote>
<p><strong>What is the difference between Varchar(max) and TEXT data type?</strong></p>
<blockquote><p>The VARCHAR(MAX) type is a replacement for TEXT. The basic difference is that a TEXT type will always store the data in a blob whereas the VARCHAR(MAX) type will attempt to store the data directly in the row unless it exceeds the 8k limitation and at that point it stores it in a blob.</p>
<p>The legacy types (TEXT, NTEXT, IMAGE) are deprecated and support for them will be dropped in a future version of SQL Server.</p></blockquote>
<p><strong>What is the difference between CHAR and VARCHAR?</strong></p>
<blockquote><p>CHAR Data Type is a Fixed Length Data Type. For example if you declare a variable/column of CHAR (10) data type, then it will always take 10 bytes irrespective of whether you are storing 1 character or 10 character in this variable or column.</p>
<p>On the other hand VARCHAR is a variable length Data Type. For example if you declare a variable/column of VARCHAR (10) data type, it will take the no. of bytes equal to the number of characters stored in this column. So, in this variable/column if you are storing only one character then it will take only one byte and if we are storing 10 characters then it will take 10 bytes.</p></blockquote>
<p><strong>What is the difference between Datetime and Datetime2?</strong></p>
<p>DateTime2 is the new Data Type introduced in SQL Server 2008 for storing Date and Time value. Microsoft Suggests to use this new Data Type instead of DateTime that is mainly available for backwards compatibility.</p>
<p><strong>Min and Max values:</strong></p>
<ul>
<li>DateTime: BETWEEN ‘1753-01-01 00:00:00’ AND ‘’9999-12-31 23:59:59.997’</li>
<li>DateTime2: BETWEEN ‘0001-01-01 00:00:00’ AND ‘9999-12-31 23:59:59.9999999’</li>
</ul>
<p><strong>Storage Size:</strong></p>
<ul>
<li>DateTime: 8 Bytes</li>
<li>DateTime2(n): 6 to 8 bytes</li>
</ul>
<p><strong>Precision:</strong></p>
<ul>
<li>DateTime – only allows for precision up to every 3rd milisecond which essentially means that you can get rounding issues for times that are in fact different. The rounding is to increments of .000, .003, or .007 seconds.</li>
<li>DateTime2(n) – The precision scale is 0 to 7 digits, with an accuracy of 100 nanoseconds . The default precision is 7 digits.</li>
</ul>
<p><strong>What is the difference between HAVING and WHERE Clause?</strong></p>
<ul>
<li>HAVING specifies a search condition for a group or an aggregate function used in SELECT statement.</li>
<li>HAVING can be used only with the SELECT statement. HAVING is typically used in a GROUP BY clause. When GROUP BY is not used, HAVING behaves like a WHERE clause.</li>
<li>A query can contain both a WHERE clause and a HAVING clause. The WHERE clause is applied first to the individual rows in the tables . Only the rows that meet the conditions in the WHERE clause are grouped. The HAVING clause, then applied to the rows in the result set. Only the groups that meet the HAVING conditions appear in the query output.</li>
</ul>
<p><strong>What is the difference Between GETDATE and SYSDATETIME?</strong></p>
<p>In case of GETDATE the precision is till miliseconds and in case of SYSDATETIME the precision is till nanoseconds.</p>
<p>&nbsp;</p>
<p><strong>What is the difference between THROW and RAISERROR?</strong></p>
<blockquote><p>When using RAISERROR function, it just returns the last (single) error message and its details, but the previous error message details are not returned by this function.</p>
<p>With the new THROW clause you won’t see any issue of omitting the previous errors. And it returns all error details as thrown by the SQL statement itself.</p></blockquote>
<p><strong>What is bit data type?</strong></p>
<blockquote><p>Bit datatype is used to store boolean information like 1 or 0 (true or false).</p>
<p>Bit datatype can represent a Null state.</p></blockquote>
<p><strong>What is the difference between SMALLINT and TINYINT?</strong></p>
<blockquote><p>The storage of TinyINT is 1 byte and can store range from 0 to 255.</p>
<p>The storage of SmallINT is 2 bytes and can store range from -32768 to 32767.</p></blockquote>
<p><strong>What is the Difference Between Cast and Convert?</strong></p>
<ul>
<li>CAST and CONVERT are both used to convert data from one data type to another.</li>
<li>CAST is part of the ANSI-SQL specification; whereas, CONVERT is not.  In fact, CONVERT is SQL implementation specific.</li>
<li>CONVERT differences lie in that it accepts an optional style parameter which is used for formatting.</li>
<li>For example, when converting a DateTime datatype to Varchar, you can specify the resulting date’s format, such as YYYY/MM/DD or MM/DD/YYYY.</li>
<li>SELECT CONVERT(VARCHAR,GETDATE(),101) as MMDDYYYY, CONVERT(VARCHAR,GETDATE(),111) as YYYYMMDD</li>
</ul>
<p>&nbsp;</p>
<p><strong>Have you ever stored XML type of data into SQL Server?</strong></p>
<blockquote><p>Yes: Using XML Data type, we can store XML formatted data into SQL Server.</p>
<p>XML is a good choice if you want a platform-independent model in order to ensure portability of the data by using structural and semantic markup.</p></blockquote>
<p><strong>What is MSDTC?</strong></p>
<blockquote><p>The Microsoft Distributed Transaction Coordinator is a transaction manager that allows client applications to include several different sources of data in one transaction.</p>
<p>MSDTC coordinates committing the distributed transaction across all the servers enlisted in the transaction.</p></blockquote>
<p><strong>What is Distributed Queries in SQL Server?</strong></p>
<blockquote><p>Distributed query access data from multiple heterogeneous data sources. These data sources can be stored on either the same or different computers. It supports distributed queries by using OLEDB.</p></blockquote>
<p><strong>What is a Two-Phase Commit?</strong></p>
<blockquote><p>In transaction processing, databases, and computer networking, the two-phase commit protocol (2PC) is a type of atomic commitment protocol (ACP). It is a distributed algorithm that coordinates all the processes that participate in a distributed atomic transaction on whether to commit or abort (roll back) the transaction.</p>
<p>Two Phase commit is used in distributed data base systems. This is useful to maintain the integrity of the database so that all the users see the same values. It contains DML statements or Remote Procedural calls that reference a remote object. There are basically 2 phases in a 2 phase commit.</p></blockquote>
<blockquote><p>Prepare Phase : Global coordinator asks participants to prepare</p>
<p>Commit Phase : Commit all participants to coordinator to Prepared, Read only or abort Reply.</p></blockquote>
<p><strong>What do you know about the SQL Server parameter sniffing?</strong></p>
<blockquote class="wp-embedded-content" data-secret="L45xWCklUM"><p><a href="https://www.dbrnd.com/2015/05/sql-server-parameter-sniffing/">SQL Server Parameter Sniffing</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2015/05/sql-server-parameter-sniffing/embed/#?secret=L45xWCklUM" data-secret="L45xWCklUM" width="600" height="338" title="&#8220;SQL Server Parameter Sniffing&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>How do we recompile a stored procedure at run time?</strong></p>
<blockquote><p>Using WITH RECOMPILE hint option, we can recompile stored procedure at run time.</p></blockquote>
<p><strong>What is a SQL_VARIANT?</strong></p>
<ul>
<li>It is a data type that stores values of various SQL Server-supported data types.</li>
<li>sql_variant can be used in columns, parameters, variables, and the return values of user-defined functions. sql_variant enables these database objects to support values of other data types.</li>
<li>A column of type sql_variant may contain rows of different data types. For example, a column defined as sql_variant can store int, binary, and char values.</li>
<li>sql_variant can have a maximum length of 8016 bytes.</li>
</ul>
<p><strong>What kind of data types which are not supported by SQL_VARIANT?</strong></p>
<ul>
<li>varchar(max)</li>
<li>varbinary(max)</li>
<li>nvarchar(max)</li>
<li>xml</li>
<li>text</li>
<li>ntext</li>
<li>image</li>
<li>rowversion (timestamp)</li>
<li>sql_variant</li>
<li>geography</li>
<li>hierarchyid</li>
<li>geometry</li>
<li>User-defined types</li>
<li>datetimeoffset</li>
</ul>
<p><strong>Would you please explain the logic to split a comma separated values?</strong></p>
<blockquote class="wp-embedded-content" data-secret="x028VWWRz4"><p><a href="https://www.dbrnd.com/2015/12/sql-serverfunction-to-split-string-value-using-different-delimiters/">SQL Server:Function to Split String Value Using Different Delimiters</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2015/12/sql-serverfunction-to-split-string-value-using-different-delimiters/embed/#?secret=x028VWWRz4" data-secret="x028VWWRz4" width="600" height="338" title="&#8220;SQL Server:Function to Split String Value Using Different Delimiters&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server: Newly created Table with red underline and showing as an Invalid Object</title>
		<link>https://www.dbrnd.com/2016/01/sql-server-newly-created-table-with-red-underline-and-showing-as-an-invalid-object/</link>
					<comments>https://www.dbrnd.com/2016/01/sql-server-newly-created-table-with-red-underline-and-showing-as-an-invalid-object/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sat, 23 Jan 2016 20:40:57 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[IntelliSence]]></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=1368</guid>

					<description><![CDATA[I created a new table, and immediately I used this table in a query, but I found the table with a red underline and showing that table is invalid. The solution is, SQL Server Management Studio IntelliSence Local Cache: We should refresh IntelliSense Local Cache so that all newly created objects added in the cache [&#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%2F2016%2F01%2Fsql-server-newly-created-table-with-red-underline-and-showing-as-an-invalid-object%2F&amp;linkname=SQL%20Server%3A%20Newly%20created%20Table%20with%20red%20underline%20and%20showing%20as%20an%20Invalid%20Object" 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%2F2016%2F01%2Fsql-server-newly-created-table-with-red-underline-and-showing-as-an-invalid-object%2F&amp;linkname=SQL%20Server%3A%20Newly%20created%20Table%20with%20red%20underline%20and%20showing%20as%20an%20Invalid%20Object" 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%2F2016%2F01%2Fsql-server-newly-created-table-with-red-underline-and-showing-as-an-invalid-object%2F&amp;linkname=SQL%20Server%3A%20Newly%20created%20Table%20with%20red%20underline%20and%20showing%20as%20an%20Invalid%20Object" 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%2F2016%2F01%2Fsql-server-newly-created-table-with-red-underline-and-showing-as-an-invalid-object%2F&amp;linkname=SQL%20Server%3A%20Newly%20created%20Table%20with%20red%20underline%20and%20showing%20as%20an%20Invalid%20Object" 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%2F2016%2F01%2Fsql-server-newly-created-table-with-red-underline-and-showing-as-an-invalid-object%2F&amp;linkname=SQL%20Server%3A%20Newly%20created%20Table%20with%20red%20underline%20and%20showing%20as%20an%20Invalid%20Object" 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%2F2016%2F01%2Fsql-server-newly-created-table-with-red-underline-and-showing-as-an-invalid-object%2F&amp;linkname=SQL%20Server%3A%20Newly%20created%20Table%20with%20red%20underline%20and%20showing%20as%20an%20Invalid%20Object" 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%2F2016%2F01%2Fsql-server-newly-created-table-with-red-underline-and-showing-as-an-invalid-object%2F&#038;title=SQL%20Server%3A%20Newly%20created%20Table%20with%20red%20underline%20and%20showing%20as%20an%20Invalid%20Object" data-a2a-url="https://www.dbrnd.com/2016/01/sql-server-newly-created-table-with-red-underline-and-showing-as-an-invalid-object/" data-a2a-title="SQL Server: Newly created Table with red underline and showing as an Invalid Object"></a></p><p>I created a new table, and immediately I used this table in a query, but I found the table with a red underline and showing that table is invalid.</p>
<p><a href="https://www.dbrnd.com/wp-content/uploads/2016/01/SQLServerIntelliSense.png" rel="attachment wp-att-1370"><img decoding="async" class="alignnone wp-image-1370 size-full" title="SQL Server IntelliSense Cache" src="https://www.dbrnd.com/wp-content/uploads/2016/01/SQLServerIntelliSense.png" alt="SQL Server IntelliSense Cache" width="216" height="231" srcset="https://www.dbrnd.com/wp-content/uploads/2016/01/SQLServerIntelliSense.png 216w, https://www.dbrnd.com/wp-content/uploads/2016/01/SQLServerIntelliSense-150x160.png 150w" sizes="(max-width: 216px) 100vw, 216px" /></a></p>
<p>The solution is,<br />
<strong>SQL Server Management Studio IntelliSence Local Cache: </strong></p>
<p>We should refresh IntelliSense Local Cache so that all newly created objects added in the cache and red underline will disappear.</p>
<p>You can refresh the IntelliSense Local Cache from the edit menu of SSMS.</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-1371 size-full" title="SQL Server IntelliSense Option" src="https://www.dbrnd.com/wp-content/uploads/2016/01/SQLServerIntelliSenseOption.png" alt="SQL Server IntelliSense Option" width="657" height="576" srcset="https://www.dbrnd.com/wp-content/uploads/2016/01/SQLServerIntelliSenseOption.png 657w, https://www.dbrnd.com/wp-content/uploads/2016/01/SQLServerIntelliSenseOption-300x263.png 300w, https://www.dbrnd.com/wp-content/uploads/2016/01/SQLServerIntelliSenseOption-150x132.png 150w" sizes="auto, (max-width: 657px) 100vw, 657px" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2016/01/sql-server-newly-created-table-with-red-underline-and-showing-as-an-invalid-object/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>PostgreSQL: How to Clear Cache of the Database Sessions</title>
		<link>https://www.dbrnd.com/2015/11/postgresql-how-to-clear-cache-of-the-database-sessions/</link>
					<comments>https://www.dbrnd.com/2015/11/postgresql-how-to-clear-cache-of-the-database-sessions/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Tue, 03 Nov 2015 18:47:07 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[buffer]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[DISCARD]]></category>
		<category><![CDATA[plpgsql]]></category>
		<category><![CDATA[Postgres Query]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[PostgreSQL Administrator]]></category>
		<category><![CDATA[PostgreSQL Error]]></category>
		<category><![CDATA[PostgreSQL Programming]]></category>
		<category><![CDATA[PostgreSQL Tips and Tricks]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=1012</guid>

					<description><![CDATA[This is one of the important topics for PostgreSQL Database Administrator. Yes, it is true that PostgreSQL has a caching system. But I didn&#8217;t find any perfect solution for clearing the cache of PostgreSQL Server. If you want to clear cache, you should restart the PostgreSQL Server. In this post, I am sharing a short [&#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%2F11%2Fpostgresql-how-to-clear-cache-of-the-database-sessions%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Clear%20Cache%20of%20the%20Database%20Sessions" 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%2F11%2Fpostgresql-how-to-clear-cache-of-the-database-sessions%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Clear%20Cache%20of%20the%20Database%20Sessions" 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%2F11%2Fpostgresql-how-to-clear-cache-of-the-database-sessions%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Clear%20Cache%20of%20the%20Database%20Sessions" 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%2F11%2Fpostgresql-how-to-clear-cache-of-the-database-sessions%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Clear%20Cache%20of%20the%20Database%20Sessions" 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%2F11%2Fpostgresql-how-to-clear-cache-of-the-database-sessions%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Clear%20Cache%20of%20the%20Database%20Sessions" 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%2F11%2Fpostgresql-how-to-clear-cache-of-the-database-sessions%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Clear%20Cache%20of%20the%20Database%20Sessions" 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%2F11%2Fpostgresql-how-to-clear-cache-of-the-database-sessions%2F&#038;title=PostgreSQL%3A%20How%20to%20Clear%20Cache%20of%20the%20Database%20Sessions" data-a2a-url="https://www.dbrnd.com/2015/11/postgresql-how-to-clear-cache-of-the-database-sessions/" data-a2a-title="PostgreSQL: How to Clear Cache of the Database Sessions"></a></p><p>This is one of the important topics for PostgreSQL Database Administrator.<br />
Yes, it is true that PostgreSQL has a caching system.</p>
<blockquote><p>But I didn&#8217;t find any perfect solution for clearing the cache of PostgreSQL Server.<br />
If you want to clear cache, you should restart the PostgreSQL Server. </p></blockquote>
<p>In this post, I am sharing a short note on PostgreSQL Discard functionality to discard temp, the query plan for running sessions. </p>
<p><strong>Using DISCARD, you can release internal resources of the Database Sessions. </strong></p>
<p><strong>DISCARD TEMP:</strong> Using this, you can drop all temporary tables which are created in the current session. </p>
<p><strong>DISCARD PLANS:</strong> Using this, you can release all internal cached query plans. </p>
<p><strong>DISCARD ALL:</strong> Using this, you can reset a session to its original state. You cannot execute this command inside the transaction block. </p>
<p>Once you have executed DISCARD ALL, internally following sequence runs. </p>
<pre class="crayon-plain-tag">SET SESSION AUTHORIZATION DEFAULT;
RESET ALL;
DEALLOCATE ALL;
CLOSE ALL;
UNLISTEN *;
SELECT pg_advisory_unlock_all();
DISCARD PLANS;
DISCARD TEMP;</pre> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2015/11/postgresql-how-to-clear-cache-of-the-database-sessions/feed/</wfw:commentRss>
			<slash:comments>9</slash:comments>
		
		
			</item>
		<item>
		<title>MySQL Flush Command</title>
		<link>https://www.dbrnd.com/2015/05/mysql-flush-command/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Thu, 28 May 2015 17:24:20 +0000</pubDate>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[FLUSH]]></category>
		<category><![CDATA[FLUSH Query Cache]]></category>
		<category><![CDATA[FLUSH Table]]></category>
		<category><![CDATA[MySQL Command]]></category>
		<category><![CDATA[MySQL Database Administrator]]></category>
		<category><![CDATA[MySQL Database Programming]]></category>
		<category><![CDATA[MySQL Tips and Tricks]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=206</guid>

					<description><![CDATA[In this post, I am sharing about the FLUSH command of MySQL. As per English dictionary FLUSH means &#8221; Wash Out &#8220;. Many times FLUSH is required for reloading and clearing internal caches. MySQL stored different query, results, and session setting into cache. MySQL database server writes a binary log for FLUSH statements. The FLUSH [&#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%2F05%2Fmysql-flush-command%2F&amp;linkname=MySQL%20Flush%20Command" 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%2F05%2Fmysql-flush-command%2F&amp;linkname=MySQL%20Flush%20Command" 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%2F05%2Fmysql-flush-command%2F&amp;linkname=MySQL%20Flush%20Command" 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%2F05%2Fmysql-flush-command%2F&amp;linkname=MySQL%20Flush%20Command" 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%2F05%2Fmysql-flush-command%2F&amp;linkname=MySQL%20Flush%20Command" 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%2F05%2Fmysql-flush-command%2F&amp;linkname=MySQL%20Flush%20Command" 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%2F05%2Fmysql-flush-command%2F&#038;title=MySQL%20Flush%20Command" data-a2a-url="https://www.dbrnd.com/2015/05/mysql-flush-command/" data-a2a-title="MySQL Flush Command"></a></p><p>In this post, I am sharing about the FLUSH command of MySQL. </p>
<blockquote><p>As per English dictionary FLUSH means &#8221; Wash Out &#8220;. Many times FLUSH is required for reloading and clearing internal caches.<br />
MySQL stored different query, results, and session setting into cache.</p></blockquote>
<p>MySQL database server writes a  binary log for FLUSH statements.</p>
<p>The FLUSH statements is a default auto-committed action like other DDL commands.</p>
<p>Below are some important FLUSH command:</p>
<p><b>FLUSH HOSTS:</b></p>
<blockquote><p>FLUSH HOSTS command will FLUSH cache of Hosts. Whenever you change IP-Address and if got any error related to Hosts, you should execute this command.</p></blockquote>
<p><b>FLUSH LOGS:</b></p>
<blockquote><p>FLUSH LOGS uses to close and reopen all log files. This action does not affect tables and also manage its internal sequence number for new logs.</p></blockquote>
<p><b>FLUSH PRIVILEGES:</b></p>
<blockquote><p>When you insert a new user into &#8221; mysql.user &#8221; table, you must execute FLUSH PRIVILEGES to reload all changes related to user accounts and privileges. Otherwise, you have to restart MySQL Service.</p></blockquote>
<p><b>FLUSH QUERY CACHE:</b></p>
<blockquote><p>MySQL QUERY CACHE is one of important of command for query optimization. FLUSH is required periodically on QUERY CACHE for better performance and efficient utilization of memory.<br />
This command does not remove any running query from the cache.</p></blockquote>
<p><b>FLUSH STATUS:</b></p>
<blockquote><p>MySQL server has many global variable and counters. All the running sessions also have a different type of status.<br />
Your index and other keys also stored separate counter and status. This command used to FLUSH all kinds of counters. During your query debugging, you can use this command for comparing the actual count with execution count.</p></blockquote>
<p><b>FLUSH TABLES:</b></p>
<blockquote><p>FLUSH TABLES will close all open tables and flush the query cache. This will also remove all query results from the cache.</p></blockquote>
<p><b>FLUSH TABLES &lt;table_name,table_name&gt;:</b></p>
<blockquote><p>You can FLUSH one or more table by specifying comma separated table name.</p></blockquote>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
