How SQL Server Executes a Query   1 comment

For every developer whether he is fresher or experience should know how SQL internally execute the query in order to dig if there is challenge in future related to performance.

  • whenever there is new request come for the SQL server in the form of SQL statement then, request created and pass to SQL server using network protocol, this task is queued in Task Queue and wait for the worker to take it further.
  • Idle worker take the task and pass to execution unit, task execution unit perform the syntax checking using parsing and compilation process and once that is completed it look for the best execution plan using optimization process.
  • Once execution plan is prepared, Operators access the data through buffer pool.
  • Buffer pool is responsible for extracting data from file system (database).
  • Data returns to the requested client and not wait for the completion, the worker process process not released till complete data extracted and return to the calling program.
  • Once task completed, worker returns to the idle state.

 

Advertisements

Posted March 18, 2018 by Izharuddin Shaikh in SQL

Tagged with

One response to “How SQL Server Executes a Query

Subscribe to comments with RSS.

  1. Mast hai

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: