Processing Heuristics

Advantage SQL Engine

Processing for SQL statements is performed almost entirely on the server. In general, the client sends the SQL statements to the Advantage Database Server, which then executes them. For SELECT statements, the server initializes the cursor and returns a handle to the client. The client then uses that handle in much the same way it uses normal table handles. For other statements (CREATE, DROP, INSERT, UPDATE, and DELETE), the processing is completed entirely on the server, and a status code is passed back to the client. Note that when you use Advantage Local Server, all processing is performed on the client workstation, so there is no division of processing between a client and a server. Otherwise, the general processing steps apply whether Advantage Database Server or Advantage Local Server is being used.

Transferring the Entire Table to the Client

During execution of SQL statements, only information requested by the client application will be transferred to the client. For example, it is not possible for an entire table to be transferred to the client unless the client specifically requests each record.

How Live Cursors are Processed

The following steps are performed for live cursors:

How Static Cursors are Processed

The following steps are performed for static cursors:

How Non-Select Statements are Processed

The following steps are performed for non-select statements:

Note When statements are prepared via AdsPrepareSQL, they can be executed via AdsExecuteSQL multiple times. The actual statement is passed to the server on the first call to AdsExecuteSQL. Each subsequent call to AdsExecuteSQL uses the existing parsed statement on the server and only the changed parameters are passed to the server.