<?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>GEQO &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/geqo/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>Thu, 08 Sep 2016 20:11:37 +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>PostgreSQL: Using EXPLAIN ANALYZE, Know your Query Execution Plan</title>
		<link>https://www.dbrnd.com/2016/09/postgresql-using-explain-analyze-know-your-query-execution-plan/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Thu, 08 Sep 2016 20:10:31 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Execution Plan]]></category>
		<category><![CDATA[EXPLAIN]]></category>
		<category><![CDATA[Explain Analyze]]></category>
		<category><![CDATA[Genetic Query Optimizer]]></category>
		<category><![CDATA[GEQO]]></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>
		<category><![CDATA[Query Optimizer]]></category>
		<category><![CDATA[Query Plan]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3616</guid>

					<description><![CDATA[Like any other RDBMS, PostgreSQL generates a Query Execution Plan for each query that it receives. It is also used Genetic Query Optimizer (GEQO) that does query planning for heuristic search and It reduce query planning time for large and complex queries. An Optimizer always tries to choose a good Query Execution Plan. The structure [&#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%2F09%2Fpostgresql-using-explain-analyze-know-your-query-execution-plan%2F&amp;linkname=PostgreSQL%3A%20Using%20EXPLAIN%20ANALYZE%2C%20Know%20your%20Query%20Execution%20Plan" 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%2F09%2Fpostgresql-using-explain-analyze-know-your-query-execution-plan%2F&amp;linkname=PostgreSQL%3A%20Using%20EXPLAIN%20ANALYZE%2C%20Know%20your%20Query%20Execution%20Plan" 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%2F09%2Fpostgresql-using-explain-analyze-know-your-query-execution-plan%2F&amp;linkname=PostgreSQL%3A%20Using%20EXPLAIN%20ANALYZE%2C%20Know%20your%20Query%20Execution%20Plan" 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%2F09%2Fpostgresql-using-explain-analyze-know-your-query-execution-plan%2F&amp;linkname=PostgreSQL%3A%20Using%20EXPLAIN%20ANALYZE%2C%20Know%20your%20Query%20Execution%20Plan" 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%2F09%2Fpostgresql-using-explain-analyze-know-your-query-execution-plan%2F&amp;linkname=PostgreSQL%3A%20Using%20EXPLAIN%20ANALYZE%2C%20Know%20your%20Query%20Execution%20Plan" 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%2F09%2Fpostgresql-using-explain-analyze-know-your-query-execution-plan%2F&amp;linkname=PostgreSQL%3A%20Using%20EXPLAIN%20ANALYZE%2C%20Know%20your%20Query%20Execution%20Plan" 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%2F09%2Fpostgresql-using-explain-analyze-know-your-query-execution-plan%2F&#038;title=PostgreSQL%3A%20Using%20EXPLAIN%20ANALYZE%2C%20Know%20your%20Query%20Execution%20Plan" data-a2a-url="https://www.dbrnd.com/2016/09/postgresql-using-explain-analyze-know-your-query-execution-plan/" data-a2a-title="PostgreSQL: Using EXPLAIN ANALYZE, Know your Query Execution Plan"></a></p><p>Like any other RDBMS, PostgreSQL generates a Query Execution Plan for each query that it receives. </p>
<blockquote><p>It is also used Genetic Query Optimizer (GEQO) that does query planning for heuristic search and It reduce query planning time for large and complex queries. </p></blockquote>
<p>An Optimizer always tries to choose a good Query Execution Plan.</p>
<blockquote><p>The structure of Query Execution Plan is like a Tree and It contains different information like: type of scan details, join details, sorting details, aggregation details, Estimated rows details, Estimated start-up cost, Estimated total cost and others.</p></blockquote>
<p>To know about the Query Execution Plan, is very important for all Database Professionals because It helps us to improve the Query Performance. </p>
<p>With the help of Query Execution Plan, We can make our decisions on Index tuning, Join tuning and other. </p>
<blockquote><p>In PostgreSQL, we have EXPLAIN and EXPLAIN ANALYZE command to know about the Query Execution Plan.</p></blockquote>
<p>Here, I have used one table tbl_itemtransactions which you can create using below post.</p>
<p><strong>Example of EXPLAIN: </strong>It generates the Estimated Query Execution Plan with out executing an actual SQL Query. </p>
<pre class="crayon-plain-tag">EXPLAIN SELECT COUNT(1) FROM tbl_itemtransactions;

/*
Result: 
"Aggregate  (cost=2555525.00..2555525.01 rows=1 width=0)"
"  -&gt;  Seq Scan on tbl_itemtransactions  
(cost=0.00..2216945.00 rows=135432000 width=0)"
*/</pre> </p>
<p><strong>Example of EXPLAIN ANALYZE:</strong> It first executes the SQL Query and than It generates the actual Query Execution Plan. </p>
<pre class="crayon-plain-tag">EXPLAIN ANALYZE SELECT COUNT(1) FROM tbl_itemtransactions;

/*
Result: 
"Aggregate  (cost=2555525.00..2555525.01 rows=1 width=0) 
(actual time=52660.132..52660.133 rows=1 loops=1)"
"  -&gt;  Seq Scan on tbl_itemtransactions  
(cost=0.00..2216945.00 rows=135432000 width=0) 
(actual time=0.027..46193.484 rows=135432001 loops=1)"
"Planning time: 0.204 ms"
"Execution time: 52660.237 ms"
*/</pre> </p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
