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 />

Table 4–1: Query-tuning options (3 of 3)<br />

4–12<br />

Option Description<br />

FIREHOSE-CURSOR Specifies at the query level that the firehose cursor type should be<br />

considered to satisfy the query when the NO-LOCK phrase is used.<br />

Note: This query-level option overrides the connection-level<br />

-Dsrv options, QT_FIREHOSE and QT_NO_FIREHOSE that determine<br />

if firehose cursors should be considered <strong>for</strong> the <strong>Data</strong><strong>Server</strong><br />

connection.<br />

NO-FIREHOSE-CURSOR Specifies at the query level that the firehose cursor type should<br />

not be considered to satisfy the query when the NO-LOCK phrase is<br />

used.<br />

Notes:This query-level option overrides the connection-level<br />

-Dsrv options, QT_FIREHOSE and QT-NO-FIREHOSE that determine<br />

if firehose cursors should be considered <strong>for</strong> the <strong>Data</strong><strong>Server</strong><br />

connection.<br />

By default, firehose cursors are available to satisfy NO-LOCK<br />

queries during a <strong>Data</strong><strong>Server</strong> session. It is generally<br />

recommended this default use be retained and overridden by<br />

QT-NO-FIREHOSE on an individual query basis in the event that<br />

slow query per<strong>for</strong>mance is observed on a very large result set.<br />

All but two of the QUERY–TUNING options take effect at both compile time and run time. The<br />

exceptions are JOIN–BY–<strong>SQL</strong>DB and NO–JOIN–BY–<strong>SQL</strong>DB, which apply only at compile time. You<br />

can override query-tuning defaults (except JOIN–BY–<strong>SQL</strong>DB) at run-time by specifying the<br />

appropriate startup parameters.<br />

The following example shows how to use the QUERY–TUNING phrase to enhance per<strong>for</strong>mance. It<br />

includes a join, JOIN-BY-<strong>SQL</strong>DB, that the <strong>Data</strong><strong>Server</strong> instructs the MS <strong>SQL</strong> <strong>Server</strong> data source<br />

to per<strong>for</strong>m by default, as shown:<br />

FOR EACH customer, EACH order OF customer WHERE order.ordernum GT 20<br />

BY customer.custnum QUERY-TUNING (JOIN-BY-<strong>SQL</strong>DB)<br />

The QUERY–TUNING options in this example specify the following:<br />

• Lookahead cursors are not used (the NO–LOOKAHEAD option)<br />

• The <strong>Data</strong><strong>Server</strong> writes an extended report on the <strong>SQL</strong> statements that it executes (the<br />

DEBUG EXTENDED option)<br />

When the <strong>Data</strong><strong>Server</strong> constructs queries <strong>for</strong> a MS <strong>SQL</strong> <strong>Server</strong> data source, it uses the<br />

QUERY–TUNING options that you specify as guidelines. This is because there might be syntax<br />

considerations that prevent the <strong>Data</strong><strong>Server</strong> from applying the QUERY–TUNING options as<br />

specified. In such a case, the <strong>Data</strong><strong>Server</strong> executes the query using the most appropriate options.<br />

Note: The <strong>Data</strong><strong>Server</strong> does not issue errors or warnings if it does not apply the<br />

QUERY–TUNING options that you specify.

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

Saved successfully!

Ooh no, something went wrong!