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.

LOOKAHEAD<br />

NO–LOOKAHEAD<br />

SEPARATE–CONNECTION<br />

NO–SEPARATE–CONNECTION<br />

Query tuning<br />

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

Option Description<br />

Specifies whether the <strong>Data</strong><strong>Server</strong> uses lookahead or standard<br />

cursors. Lookahead cursors fetch as many records as fit in the<br />

allocated cache (see the CACHE–SIZE entry in this table). This<br />

reduces the number of <strong>SQL</strong> statements and network messages<br />

that are required, thereby improving per<strong>for</strong>mance.<br />

Using lookahead cursors results in behavior that is different from<br />

an <strong>OpenEdge</strong> database because changes made to the records in<br />

the cache might not be immediately visible. Specify<br />

NO–LOOKAHEAD <strong>for</strong> behavior that is consistent with <strong>OpenEdge</strong>.<br />

Default: LOOKAHEAD, when statements use NO-LOCK or when<br />

statements use SHARE-LOCK with TXN_ISOLATION level set to 1<br />

(read uncommitted.)<br />

Specifies whether each cursor should use a separate database<br />

connection. Executing cursors in separate connections might<br />

improve per<strong>for</strong>mance because the <strong>Data</strong><strong>Server</strong> does not have to<br />

restart the cursors and sort the results.<br />

Do not specify SEPARATE–CONNECTION if you require behavior<br />

that is consistent with <strong>OpenEdge</strong>.<br />

Default: NO–SEPARATE–CONNECTION except in certain cases. For<br />

details, see the “Managing connections to an MS <strong>SQL</strong> <strong>Server</strong><br />

database” section on page 6–29.<br />

NO-QUERY-ORDER-ADDED Specifies that <strong>OpenEdge</strong> should not choose an index in the<br />

absence of a USE-INDEX or BY clause in the query request.<br />

<strong>OpenEdge</strong> may otherwise select an index if it is needed to provide<br />

ABL language compatibility.<br />

Note: If you elect to use this option to omit index selection on<br />

the query, you may see better per<strong>for</strong>mance using the optimizer’s<br />

sort selections. However, compatibility with <strong>OpenEdge</strong><br />

<strong>for</strong>ward/backward scrolling and reposition capability may be<br />

lost. Only use this option when compatibility is not required and<br />

can be overlooked <strong>for</strong> the sake of better per<strong>for</strong>mance.<br />

NO-QUERY-UNIQUE-ADDED Specifies that <strong>OpenEdge</strong> should omit the record identifier from<br />

the end of the query’s generated ORDER BY clause when trying to<br />

obtain record uniqueness from a selected non-unique index. A<br />

sort order that is modified to derive uniqueness may produce a<br />

query that can’t find a useful index to per<strong>for</strong>m sorting thus<br />

impacting query per<strong>for</strong>mance.<br />

Note: If you elect to use this option, the query may find an index<br />

match to provide better per<strong>for</strong>mance. However, turning off<br />

uniqueness in a query where scrolling is required may result in<br />

behavior that is incompatible with the <strong>OpenEdge</strong> ABL. Only use<br />

this option when compatibility is not required and can be<br />

overlooked <strong>for</strong> the sake of better per<strong>for</strong>mance.<br />

4–11

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

Saved successfully!

Ooh no, something went wrong!