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.

Query tuning<br />

Query tuning<br />

How you structure a query determines how efficiently you access a database. Using your MS<br />

<strong>SQL</strong> <strong>Server</strong> data source efficiently enhances the per<strong>for</strong>mance of <strong>Data</strong><strong>Server</strong> applications. The<br />

standard approach to enhancement is using selection criteria to refine access to data, but you can<br />

further optimize the <strong>Data</strong><strong>Server</strong>’s execution of a query by specifying the <strong>OpenEdge</strong><br />

QUERY–TUNING phrase.<br />

You can include the QUERY–TUNING phrase in these <strong>OpenEdge</strong> statements:<br />

• FOR EACH<br />

Syntax<br />

FOR EACH table QUERY-TUNING(query-tuning-option<br />

query-tuning-option...)<br />

• OPEN QUERY<br />

Syntax<br />

OPEN QUERY query QUERY-TUNING(query-tuning-option<br />

query-tuning-option...)<br />

• DO PRESELECT<br />

Syntax<br />

DO PRESELECT table QUERY-TUNING(query-tuning-option<br />

query-tuning-option...)<br />

• REPEAT PRESELECT<br />

Syntax<br />

REPEAT PRESELECT table QUERY-TUNING(query-tuning-option<br />

query-tuning-option...)<br />

You must place the QUERY–TUNING phrase after the last record phrase. For example, place it near<br />

the end of the statement where you also place block modifier phrases such as BREAK, ON ERROR,<br />

and TRANSACTION.<br />

You can include multiple query-tuning options in a single statement; simply separate each<br />

option from the previous one by a single space.<br />

4–9

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

Saved successfully!

Ooh no, something went wrong!