11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Optimizer Hint property<br />

Description<br />

Specifies a hint string that <strong>Form</strong> <strong>Builder</strong> passes on to the RDBMS optimizer when constructing queries.<br />

Using the optimizer can improve the performance of database transactions.<br />

Applies to block<br />

Set Designer, programmatically<br />

Refer to Built-in<br />

• GET_BLOCK_PROPERTY<br />

• SET_BLOCK_PROPERTY<br />

Restrictions:<br />

Valid only for applications running against the <strong>Oracle</strong>7 Server or <strong>Oracle</strong>8 Server.<br />

Usage Notes<br />

Consider a form that contains a block named DeptBlock based on the DEPT table. If the end user enters<br />

a criteria of " > 25 " for the DEPTNO column and executes the query, the default SELECT statement<br />

that <strong>Form</strong> <strong>Builder</strong> generates to query the appropriate rows from the database is as follows:<br />

SELECT DEPTNO,DNAME,LOC,ROWID<br />

FROM DEPT<br />

WHERE (DEPTNO > 25)<br />

The designer can use SET_BLOCK_PROPERTY to set the Optimizer Hint property to request that the<br />

<strong>Oracle</strong>7 Server attempt to optimize the SQL statement for best response time:<br />

Set_Block_Property(’DeptBlock’,OPTIMIZER_HINT,’FIRST_ROWS’);<br />

SELECT /*+ FIRST_ROWS */ DEPTNO,DNAME,LOC,ROWID<br />

FROM DEPT<br />

WHERE (DEPTNO > 25)<br />

For more information on how to use this feature with <strong>Oracle</strong>7, refer to the following sources:<br />

• <strong>Oracle</strong>7 Server Application <strong>Developer</strong>’s Guide, Chapter 5, "Tuning SQL Statements"<br />

• <strong>Oracle</strong>7 Server Concepts Manual, Chapter 13, "The Optimizer"<br />

154

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

Saved successfully!

Ooh no, something went wrong!