LAZY Loading Oracle APEX

Lazy Loading

Specify whether to load the region independently of the data for the region.

When lazy loading is specified, the page is rendered immediately, showing an empty region, until the data is loaded. Generally, the page is not displayed until all of the page is loaded and ready to be rendered. Therefore, if it takes 5 seconds to load all of the data for a region, without lazy loading, the end user would have to wait 5 seconds before the page started to render.

Note - Lazy Loading should only be utilized on data sets that take significant time to load, as this adds unnecessary processing overhead on the database for regions that load quickly. Interactive Grid already have Lazy loading option by default.

Step 1: Create a page with Before header process.

:P30_LOAD:='N';

Step 2: Add Page item PX_ITEM with dynamic action on page load. and Refresh region.

 Action   : Set value.
 Set Type : Static Assignment
 Value    : Y
 Fire on Initialization : Yes

preview

Step 3: Create a report using below Query.

select EMPNO,
       ENAME,
       JOB,
       MGR,
       HIREDATE,
       SAL,
       COMM,
       DEPTNO
  from EMP1
 where NVL(:P30_LOAD,'N')='Y'

comments powered by Disqus