13.01.2013 Views

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Additional Features to Enhance <strong>Data</strong><strong>Server</strong> Per<strong>for</strong>mance<br />

<strong>OpenEdge</strong> query types<br />

4–8<br />

The <strong>Data</strong><strong>Server</strong> provides several ways to submit an <strong>OpenEdge</strong> query to a MS <strong>SQL</strong> <strong>Server</strong> data<br />

source:<br />

• ABL — This approach applies to the DEFINE QUERY and FOR EACH statements. The<br />

<strong>Data</strong><strong>Server</strong> generates <strong>SQL</strong> <strong>for</strong> each of these statements. You can use the QUERY–TUNING<br />

option to customize the queries that the <strong>Data</strong><strong>Server</strong> passes to ODBC.<br />

• <strong>OpenEdge</strong> <strong>SQL</strong> SELECT — This approach applies to the <strong>SQL</strong> SELECT statement. When<br />

you use this statement in an <strong>OpenEdge</strong> procedure, the <strong>Data</strong><strong>Server</strong> passes the <strong>SQL</strong> directly<br />

to the data source. This can improve per<strong>for</strong>mance, especially when counting records, and<br />

can also allow you to access certain types of data more effectively, such as aggregates.<br />

• Vendor-specific <strong>SQL</strong> — This approach applies to RDBMS stored procedures. If you<br />

want to use specialized query syntax supported only by Transact-<strong>SQL</strong> extensions, you can<br />

use RUN–STORED–PROC send–sql–statement to send the syntax to MS <strong>SQL</strong> <strong>Server</strong>. You<br />

might use a stored procedure to include BEGINS as a search criterion; this <strong>SQL</strong> query can<br />

result in better per<strong>for</strong>mance. For more in<strong>for</strong>mation, see Chapter 3, “RDBMS Stored<br />

Procedure Details.”<br />

Whether your application can take advantage of the strengths of a particular approach depends<br />

on the kind of query you are writing and the kind of data you are accessing. Another factor to<br />

keep in mind when you decide which technique to use <strong>for</strong> issuing queries is whether a query is<br />

better served by being processed by the client or by the server. ABL queries are processed by<br />

the client (except in the cases of most joins); <strong>SQL</strong> SELECT statements and Transact-<strong>SQL</strong><br />

extensions are processed by the server.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!