SQL Database Creation · Module 6

How are queries processed?

Lesson 4
Lesson 4How are queries processed?
ObjectiveExplain how SQL Server 7 processes queries.

How are queries processed?

To take full advantage of the power of SQL Server 7, you have to know how to write effective and efficient queries. To do this, you need a basic understanding of how SQL Server 7 processes queries. Here's what you need to know:

Query processor

Queries are processed by an engine within SQL Server called the query processor. The query processor in version 7 has been totally redesigned to support very large databases and complex queries. This makes SQL Server 7 ready for very robust applications.
The query processor engine takes care of tasks such as:
  1. Using Object Linking and Embedding for Databases (OLE DB) to communicate with database storage facilities
  2. Computing statistics related to your queries
  3. Passing queries to the query optimizer, which is a self-contained part of the query processor

Query optimizer

The query optimizer runs underneath the query processor, and determines:
  1. The best cost-based execution strategy for SQL Server 7
  2. Which, if any, indexes should be used to speed up the query

In the next lesson, we'll cover the basic elements of a Transact-SQL statement.

queries.qz.html

Before moving on to the next lesson, click the Quiz button to check your knowledge of Transact-SQL basics and query processing.
transactSql-basics-quiz.html