Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Sunday, January 1, 2017

Using ADF View Object to display huge datasets

Issue:
In some cases, we may have huge database table with million of records or more. Querying and displaying these records may slow down your web application if it is not coded efficiently.

Solution:
Using Oracle ADF View Object component, you can tune database query easily. If you need to display only certain number of records, you can use View Object tuning configuration and set number of row to display to UI. This will increase performance by reducing number of records need to be returned from database and displayed.

Example:
In ADF Model project, double click on View Object and go to General tab. You should see Tuning option like below.



Set "Only up to row number" to display "Top-N" entries in the page and avoiding database to return all the records from database.

Often you may want to use Query Optimizer Hint FIRST_ROWS that gives a hint to the database that you want to return the first rows as quick as possible rather than trying to optimize the retrieval of all records.