<?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 executor &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/query-executor/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, 02 Jan 2017 18:59:12 +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 Interview: How internally it executes a SQL Statement?</title>
		<link>https://www.dbrnd.com/2017/01/sql-server-interview-how-internally-it-executes-a-sql-statement/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Mon, 02 Jan 2017 18:59:12 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[Binding]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Parser]]></category>
		<category><![CDATA[query executor]]></category>
		<category><![CDATA[Query Optimizer]]></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=2419</guid>

					<description><![CDATA[The Storage Engine and Query Processor are both important core part of SQL Server. Storage Engine is responsible for data integrity and data storage in disk / memory while the Query Processor simply process the query bases on execution plan and return the result. Most of the interviewer asks this question to SQL Server DBA [&#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%2F01%2Fsql-server-interview-how-internally-it-executes-a-sql-statement%2F&amp;linkname=SQL%20Server%20Interview%3A%20How%20internally%20it%20executes%20a%20SQL%20Statement%3F" 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%2F01%2Fsql-server-interview-how-internally-it-executes-a-sql-statement%2F&amp;linkname=SQL%20Server%20Interview%3A%20How%20internally%20it%20executes%20a%20SQL%20Statement%3F" 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%2F01%2Fsql-server-interview-how-internally-it-executes-a-sql-statement%2F&amp;linkname=SQL%20Server%20Interview%3A%20How%20internally%20it%20executes%20a%20SQL%20Statement%3F" 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%2F01%2Fsql-server-interview-how-internally-it-executes-a-sql-statement%2F&amp;linkname=SQL%20Server%20Interview%3A%20How%20internally%20it%20executes%20a%20SQL%20Statement%3F" 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%2F01%2Fsql-server-interview-how-internally-it-executes-a-sql-statement%2F&amp;linkname=SQL%20Server%20Interview%3A%20How%20internally%20it%20executes%20a%20SQL%20Statement%3F" 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%2F01%2Fsql-server-interview-how-internally-it-executes-a-sql-statement%2F&amp;linkname=SQL%20Server%20Interview%3A%20How%20internally%20it%20executes%20a%20SQL%20Statement%3F" 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%2F01%2Fsql-server-interview-how-internally-it-executes-a-sql-statement%2F&#038;title=SQL%20Server%20Interview%3A%20How%20internally%20it%20executes%20a%20SQL%20Statement%3F" data-a2a-url="https://www.dbrnd.com/2017/01/sql-server-interview-how-internally-it-executes-a-sql-statement/" data-a2a-title="SQL Server Interview: How internally it executes a SQL Statement?"></a></p><p><em>The Storage Engine and Query Processor are both important core part of SQL Server. Storage Engine is responsible for data integrity and data storage in disk / memory while the Query Processor simply process the query bases on execution plan and return the result.</p>
<p>Most of the interviewer asks this question to SQL Server DBA that How SQL Server executes SQL Query and Statement so I have decided to prepare a short note on this.<br />
</em><br />
<strong>How SQL Server internally executes SQL Query and Statement?<br />
</strong></p>
<p><strong>Parser:</strong></p>
<blockquote><p>The Parser makes sure that the T-SQL query has a valid syntax, and translates the SQL query into an initial logical tree representation with different information such as operators, join conditions, expressions, identifiers.<br />
It sents this logical tree to Query Optimizer. </p></blockquote>
<p><strong>Binding:</strong></p>
<blockquote><p>It is a name resolution process and SQL Server makes sure that all object names are valid and they exist on a disk.<br />
It creates algebrized tree with table and column names information and sents to Query Optimizer.</p></blockquote>
<p><strong>The Query Optimizer: </strong></p>
<blockquote><p>It uses logical tree and algebrized tree generated by Parsing and Binding Process and extracts the different information like, table data, table definition, database information and other database statistics. </p></blockquote>
<blockquote><p>If we look at specific table data extraction operation, there are different approaches like: selecting few records require Index Scan, selecting all table data require Table Scan, selecting data from multiple tables require parsing of JOIN conditions. </p></blockquote>
<blockquote><p>Query Optimizer is to find an efficient execution plan for your query. Even for relatively simple queries, there may be a large number of different ways to access the data to produce the same end result.</p></blockquote>
<blockquote><p>The Query Optimizer is a cost-based optimizer. Each execution plan has associated with cost estimation stats so After extracting the information, Query Optimizer chooses the best efficient execution plan and submit a query to query execution engine.
</p></blockquote>
<blockquote><p>Query Optimizer is working within a time constraint, there’s a chance that the plan selected may be the optimal plan, but it is also likely that it may just be something close to the optimal plan.</p></blockquote>
<p><strong>Query Execution:</strong></p>
<blockquote><p>After optimization of the query, the Execution Engine selects resulting plan and retrieve the desired data.</p>
<p>It also stores generated execution plan into the memory for the query caching purpose.<br />
The stored plan cache may reuse for same query execution, which actually saves lots of time of the Query Optimizer.</p></blockquote>
]]></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>
