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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

Enhancements overview<br />

4–2<br />

When you develop a <strong>Data</strong><strong>Server</strong> application, you can design it either to emphasize portability<br />

across data sources or to optimize the strengths of the <strong>Data</strong><strong>Server</strong>’s interaction with a MS <strong>SQL</strong><br />

<strong>Server</strong> database. For example, you might write a query that gives you consistent results across<br />

databases or one that takes advantage of MS <strong>SQL</strong> <strong>Server</strong>’s cursor management functionality.<br />

In addition to influencing how <strong>Data</strong><strong>Server</strong> applications per<strong>for</strong>m through queries, you can<br />

control how the <strong>Data</strong><strong>Server</strong> processes queries on a statement-by-statement basis. Some of the<br />

<strong>Data</strong><strong>Server</strong>’s default behavior might not be optimal <strong>for</strong> the application you are designing. The<br />

QUERY–TUNING phrase and startup and connection parameters give you the ability to control<br />

query processing.<br />

In<strong>for</strong>mation on query tuning appears in the following locations:<br />

• The remaining sections of this chapter document the QUERY–TUNING phrase.<br />

• For in<strong>for</strong>mation on tuning queries at compile time and run time, see the “Query tuning<br />

with connection and startup parameters” section on page 6–16.<br />

Connection pooling<br />

The <strong>Data</strong><strong>Server</strong> <strong>for</strong> <strong>Microsoft</strong> <strong>SQL</strong> <strong>Server</strong> is enhanced with the ability to <strong>for</strong>m a connection<br />

pool. A connection pool is a set of database connections that are available <strong>for</strong> an application to<br />

use and reuse without having to be reestablished. Connection pooling significantly improves the<br />

cursor management associated with no-lock queries, particularly multi-table joins. Creating and<br />

tearing down connections can be resource intensive. Using a pooled connection to keep existing<br />

connections alive results in significant per<strong>for</strong>mance gains because the <strong>Data</strong><strong>Server</strong> avoids the<br />

overhead of making a connection <strong>for</strong> each request. ABL applications that open multiple no-lock<br />

queries and handle their results simultaneously experience the best cumulative per<strong>for</strong>mance<br />

gains from connection pooling.<br />

Main components<br />

Connection pooling <strong>for</strong> the <strong>Data</strong><strong>Server</strong> <strong>for</strong> <strong>Microsoft</strong> <strong>SQL</strong> <strong>Server</strong> is a combination of ODBC<br />

connection pooling and <strong>Data</strong><strong>Server</strong> connection management. These connection components can<br />

be used as follows:<br />

• Individually, ODBC connection pooling or <strong>Data</strong><strong>Server</strong> connection management provides<br />

the foundation required <strong>for</strong> firehose cursors, but enabling both provides the best<br />

per<strong>for</strong>mance. For more in<strong>for</strong>mation on firehose cursors, see the “Firehose and Fast<br />

Forward-Only Cursors” section on page 4–5.<br />

Without a connection pool, firehose cursors would block an application until a full result<br />

set is retrieved. Because of this, when connection pooling is disabled, firehose cursors are<br />

also disabled. By maintaining multiple connections and one cursor per connection,<br />

read-only requests only block the connection on which they retrieve results, freeing ABL<br />

applications to continue processing data on the other connections.<br />

• ODBC connection pooling and <strong>Data</strong><strong>Server</strong> connection management provide the highest<br />

per<strong>for</strong>mance improvements when enabled together, but they can also be enabled<br />

independent of one another.

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

Saved successfully!

Ooh no, something went wrong!