Database Reference
In-Depth Information
Part of the overhead of the cursor depends on the cursor characteristics. The characteristics of the cursors
provided by SQL Server and the data access layers can be broadly classified into three categories.
Cursor location: Defines the location of the cursor creation
Cursor concurrency: Defines the degree of isolation and synchronization of a cursor with the
underlying content
Cursor type: Defines the specific characteristics of a cursor
Before looking at the costs of cursors, I'll take a few pages to introduce the various characteristics of cursors.
You can undo the changes to the Person.AddressType table with this query:
UPDATE Person.AddressType
SET [Name] = LEFT([Name], LEN([Name]) - 1);
Cursor Location
Based on the location of its creation, a cursor can be classified into one of two categories.
Client-side cursors
Server-side cursors
The T-SQL cursors are always created on SQL Server. However, the database API cursors can be created on either
the client or server side.
Client-Side Cursors
As its name signifies, a client-side cursor is created on the machine running the application, whether the app is a
service, a data access layer, or the front end for the user. It has the following characteristics:
It is created on the client machine.
The cursor metadata is maintained on the client machine.
It is created using the data access layers.
It works against most of the data access layers (OLEDB providers and ODBC drivers).
It can be a forward-only or static cursor.
Cursor types, including forward-only and static cursor types, are described later in the chapter in the
“Cursor types” section.
Note
 
 
Search WWH ::




Custom Search