<?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>EXPLAIN FOR CONNECTION &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/explain-for-connection/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>Fri, 29 Sep 2017 07:21:54 +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>MySQL 5.7: Introduced EXPLAIN FOR CONNECTION to check the Execution Plan of Running Connections</title>
		<link>https://www.dbrnd.com/2016/02/mysql-5-7-introduced-explain-for-connection-to-check-the-execution-plan-of-running-connections/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Thu, 04 Feb 2016 19:57:37 +0000</pubDate>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[Connections]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[EXPLAIN]]></category>
		<category><![CDATA[EXPLAIN FOR CONNECTION]]></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>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=1470</guid>

					<description><![CDATA[In this post, I am sharing a new feature of MySQL 5.7 which is EXPLAIN FOR CONNECTION. As we all aware about the EXPLAIN command of MySQL Server, which we are using to find a query execution information. EXPLAIN FOR CONNECTION is a new feature and using this we can find query execution information about [&#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%2F02%2Fmysql-5-7-introduced-explain-for-connection-to-check-the-execution-plan-of-running-connections%2F&amp;linkname=MySQL%205.7%3A%20Introduced%20EXPLAIN%20FOR%20CONNECTION%20to%20check%20the%20Execution%20Plan%20of%20Running%20Connections" 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%2F02%2Fmysql-5-7-introduced-explain-for-connection-to-check-the-execution-plan-of-running-connections%2F&amp;linkname=MySQL%205.7%3A%20Introduced%20EXPLAIN%20FOR%20CONNECTION%20to%20check%20the%20Execution%20Plan%20of%20Running%20Connections" 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%2F02%2Fmysql-5-7-introduced-explain-for-connection-to-check-the-execution-plan-of-running-connections%2F&amp;linkname=MySQL%205.7%3A%20Introduced%20EXPLAIN%20FOR%20CONNECTION%20to%20check%20the%20Execution%20Plan%20of%20Running%20Connections" 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%2F02%2Fmysql-5-7-introduced-explain-for-connection-to-check-the-execution-plan-of-running-connections%2F&amp;linkname=MySQL%205.7%3A%20Introduced%20EXPLAIN%20FOR%20CONNECTION%20to%20check%20the%20Execution%20Plan%20of%20Running%20Connections" 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%2F02%2Fmysql-5-7-introduced-explain-for-connection-to-check-the-execution-plan-of-running-connections%2F&amp;linkname=MySQL%205.7%3A%20Introduced%20EXPLAIN%20FOR%20CONNECTION%20to%20check%20the%20Execution%20Plan%20of%20Running%20Connections" 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%2F02%2Fmysql-5-7-introduced-explain-for-connection-to-check-the-execution-plan-of-running-connections%2F&amp;linkname=MySQL%205.7%3A%20Introduced%20EXPLAIN%20FOR%20CONNECTION%20to%20check%20the%20Execution%20Plan%20of%20Running%20Connections" 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%2F02%2Fmysql-5-7-introduced-explain-for-connection-to-check-the-execution-plan-of-running-connections%2F&#038;title=MySQL%205.7%3A%20Introduced%20EXPLAIN%20FOR%20CONNECTION%20to%20check%20the%20Execution%20Plan%20of%20Running%20Connections" data-a2a-url="https://www.dbrnd.com/2016/02/mysql-5-7-introduced-explain-for-connection-to-check-the-execution-plan-of-running-connections/" data-a2a-title="MySQL 5.7: Introduced EXPLAIN FOR CONNECTION to check the Execution Plan of Running Connections"></a></p><p>In this post, I am sharing a new feature of MySQL 5.7 which is EXPLAIN FOR CONNECTION.<br />
As we all aware about the EXPLAIN command of MySQL Server, which we are using to find a query execution information.</p>
<p><strong>EXPLAIN FOR CONNECTION is a new feature and using this we can find query execution information about a running query connection. </strong></p>
<blockquote><p>When we are diagnosing performance problems, then this is very useful for us.<br />
For example, We are running a statement in one session which is taking a long time, but using EXPLAIN FOR CONNECTION we can check the reason for the delay in another session. </p></blockquote>
<p>We need to pass connection_id to check the running connection information.<br />
We can check connection_id using different method like:</p>
<pre class="crayon-plain-tag">SHOW PROCESSLIST;

SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;

SELECT CONNECTION_ID();</pre> </p>
<p><strong><code><br />
<a href="https://www.dbrnd.com/2015/08/show-find-and-kill-running-process-in-mysql/" target="_blank">You can also visit this article to find and kill the running connections of MySQL. </a></code></strong><br />
<strong></p>
<p>The syntax :</strong></p>
<pre class="crayon-plain-tag">EXPLAIN [options] FOR CONNECTION connection_id;</pre> </p>
<p>Once you execute above command and if result is empty, there are no any explainable statements. If we have SELECT, INSERT, UPDATE and DELETE, we can get execution information using this option. </p>
<p><strong>For example: </strong></p>
<pre class="crayon-plain-tag">mysql&gt; SELECT CONNECTION_ID();
+-----------------+
| CONNECTION_ID() |
+-----------------+
|            8254 |
+-----------------+
1 row in set (0.00 sec)

mysql&gt; EXPLAIN FOR CONNECTION 8254;
ERROR 1889 (HY000): EXPLAIN FOR CONNECTION command is supported
only for SELECT/UPDATE/INSERT/DELETE/REPLACE</pre> </p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
