<?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>planner &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/planner/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, 05 Sep 2016 12:55:32 +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>PostgreSQL: Important Statistics Table, Used by the Query Planner</title>
		<link>https://www.dbrnd.com/2016/09/postgresql-important-statistics-table-used-by-the-query-planner-pg_class-pg_stats-vacuum-analyze/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 04 Sep 2016 12:55:17 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[ANALYZE]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[pg_class]]></category>
		<category><![CDATA[pg_stats]]></category>
		<category><![CDATA[planner]]></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 optimzer]]></category>
		<category><![CDATA[Statistics]]></category>
		<category><![CDATA[VACUUM]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3585</guid>

					<description><![CDATA[In any RDBMS system, Different type of Statistics is very important for Query Optimizer and Planner to choose and generate the best Query Execution Plan. PostgreSQL Database Server also managing different types of Statistic which are used by the Query Optimizer to generate the best Query Execution Plan. Statistical data should be updated, Why? For [&#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-important-statistics-table-used-by-the-query-planner-pg_class-pg_stats-vacuum-analyze%2F&amp;linkname=PostgreSQL%3A%20Important%20Statistics%20Table%2C%20Used%20by%20the%20Query%20Planner" 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-important-statistics-table-used-by-the-query-planner-pg_class-pg_stats-vacuum-analyze%2F&amp;linkname=PostgreSQL%3A%20Important%20Statistics%20Table%2C%20Used%20by%20the%20Query%20Planner" 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-important-statistics-table-used-by-the-query-planner-pg_class-pg_stats-vacuum-analyze%2F&amp;linkname=PostgreSQL%3A%20Important%20Statistics%20Table%2C%20Used%20by%20the%20Query%20Planner" 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-important-statistics-table-used-by-the-query-planner-pg_class-pg_stats-vacuum-analyze%2F&amp;linkname=PostgreSQL%3A%20Important%20Statistics%20Table%2C%20Used%20by%20the%20Query%20Planner" 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-important-statistics-table-used-by-the-query-planner-pg_class-pg_stats-vacuum-analyze%2F&amp;linkname=PostgreSQL%3A%20Important%20Statistics%20Table%2C%20Used%20by%20the%20Query%20Planner" 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-important-statistics-table-used-by-the-query-planner-pg_class-pg_stats-vacuum-analyze%2F&amp;linkname=PostgreSQL%3A%20Important%20Statistics%20Table%2C%20Used%20by%20the%20Query%20Planner" 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-important-statistics-table-used-by-the-query-planner-pg_class-pg_stats-vacuum-analyze%2F&#038;title=PostgreSQL%3A%20Important%20Statistics%20Table%2C%20Used%20by%20the%20Query%20Planner" data-a2a-url="https://www.dbrnd.com/2016/09/postgresql-important-statistics-table-used-by-the-query-planner-pg_class-pg_stats-vacuum-analyze/" data-a2a-title="PostgreSQL: Important Statistics Table, Used by the Query Planner"></a></p><p>In any RDBMS system, Different type of Statistics is very important for Query Optimizer and Planner to choose and generate the best Query Execution Plan. </p>
<blockquote><p>PostgreSQL Database Server also managing different types of Statistic which are used by the Query Optimizer to generate the best Query Execution Plan. </p></blockquote>
<p><strong>Statistical data should be updated, Why?</strong><br />
For Example, </p>
<blockquote><p>We have one table with 100000 rows, but table statistic data are not updated and showing only 1000 tuples information. </p></blockquote>
<blockquote><p>Query optimizer always looks into Statistic tables, It never looks into direct table files. </p></blockquote>
<blockquote><p>So in this situation, It generates the wrong Query Execution Plan because It has only 1000 rows information, but actually there are 100000 rows. </p></blockquote>
<p>PostgreSQL Database Server is mainly using two Statistical Table. </p>
<pre class="crayon-plain-tag">SELECT *FROM pg_class;
SELECT *FROM pg_stats;</pre> </p>
<blockquote><p>You can also query these tables and can find information about Tables, Indexes, Pages and others. </p></blockquote>
<blockquote><p>When you look into table pg_class, you can find &#8220;reltuples&#8221; column. You can compare this column value with your actual table record count. </p></blockquote>
<blockquote><p>If you find any mismatch, for that table statistic information is not updated. </p></blockquote>
<p><strong>Execute Analyze command:</strong></p>
<blockquote><p>When you find that Statistical information is not updated, you can execute the ANALYZE command on the Database or Table.<br />
After executing the ANALYZE command, It updates all require statistics.
</p></blockquote>
<blockquote class="wp-embedded-content" data-secret="es4VwJnXrq"><p><a href="https://www.dbrnd.com/2015/11/postgresql-short-note-on-vacuum-vacuum-full-and-analyze/">PostgreSQL: Short note on VACUUM, VACUUM FULL and ANALYZE</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2015/11/postgresql-short-note-on-vacuum-vacuum-full-and-analyze/embed/#?secret=es4VwJnXrq" data-secret="es4VwJnXrq" width="600" height="338" title="&#8220;PostgreSQL: Short note on VACUUM, VACUUM FULL and ANALYZE&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PostgreSQL: The Internal path of a Query Execution to Obtain a Result</title>
		<link>https://www.dbrnd.com/2016/08/postgresql-the-internal-path-of-a-query-execution-to-obtain-a-result-connection-parser-planner-optimizer-executor/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Tue, 09 Aug 2016 05:38:29 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[connection]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[planner]]></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 executor]]></category>
		<category><![CDATA[query parser]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=2255</guid>

					<description><![CDATA[I am going to share short notes on, how a query is internally processed in PostgreSQL? There are different stages involved in the PostgreSQL query execution process and I will explain short notes on each and later I will try to write in details for each one of it. Connection: The connection has to be [&#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%2F08%2Fpostgresql-the-internal-path-of-a-query-execution-to-obtain-a-result-connection-parser-planner-optimizer-executor%2F&amp;linkname=PostgreSQL%3A%20The%20Internal%20path%20of%20a%20Query%20Execution%20to%20Obtain%20a%20Result" 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%2F08%2Fpostgresql-the-internal-path-of-a-query-execution-to-obtain-a-result-connection-parser-planner-optimizer-executor%2F&amp;linkname=PostgreSQL%3A%20The%20Internal%20path%20of%20a%20Query%20Execution%20to%20Obtain%20a%20Result" 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%2F08%2Fpostgresql-the-internal-path-of-a-query-execution-to-obtain-a-result-connection-parser-planner-optimizer-executor%2F&amp;linkname=PostgreSQL%3A%20The%20Internal%20path%20of%20a%20Query%20Execution%20to%20Obtain%20a%20Result" 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%2F08%2Fpostgresql-the-internal-path-of-a-query-execution-to-obtain-a-result-connection-parser-planner-optimizer-executor%2F&amp;linkname=PostgreSQL%3A%20The%20Internal%20path%20of%20a%20Query%20Execution%20to%20Obtain%20a%20Result" 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%2F08%2Fpostgresql-the-internal-path-of-a-query-execution-to-obtain-a-result-connection-parser-planner-optimizer-executor%2F&amp;linkname=PostgreSQL%3A%20The%20Internal%20path%20of%20a%20Query%20Execution%20to%20Obtain%20a%20Result" 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%2F08%2Fpostgresql-the-internal-path-of-a-query-execution-to-obtain-a-result-connection-parser-planner-optimizer-executor%2F&amp;linkname=PostgreSQL%3A%20The%20Internal%20path%20of%20a%20Query%20Execution%20to%20Obtain%20a%20Result" 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%2F08%2Fpostgresql-the-internal-path-of-a-query-execution-to-obtain-a-result-connection-parser-planner-optimizer-executor%2F&#038;title=PostgreSQL%3A%20The%20Internal%20path%20of%20a%20Query%20Execution%20to%20Obtain%20a%20Result" data-a2a-url="https://www.dbrnd.com/2016/08/postgresql-the-internal-path-of-a-query-execution-to-obtain-a-result-connection-parser-planner-optimizer-executor/" data-a2a-title="PostgreSQL: The Internal path of a Query Execution to Obtain a Result"></a></p><p><strong>I am going to share short notes on, how a query is internally processed in PostgreSQL?</strong></p>
<p><em>There are different stages involved in the PostgreSQL query execution process and I will explain short notes on each and later I will try to write in details for each one of it. </em></p>
<blockquote><p><strong>Connection:</strong> The connection has to be established from an application program to the PostgreSQL Server. </p></blockquote>
<blockquote><p><strong>Parser:</strong> It creates a query tree after checking of all the query syntax which is sent by an application. </p></blockquote>
<blockquote><p><strong>Rewrite System:</strong> It takes the query tree from the parser and check for any other rules and modification. For example, if the query contains a VIEW, it has to modify the query to select a base table which is related to that view. </p></blockquote>
<blockquote><p><strong>Planner or Optimizer:</strong> It creates all possible query paths and after that it chooses one of the cheapest path for query execution.<br />
For example, It finds two paths, one path is the table scan without an index and second path is the index scan with the indexes. It is estimated  and executes the best path. </p></blockquote>
<blockquote><p><strong>Executor:</strong> It takes the plan from the Planner and extract the required set of the rows. Internally, it manages the pipeline mechanism and one by one it takes the Query-Plan and delivers the required rows.</p></blockquote>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
