Redundant Data Accessing the Data

24-42 Publishing Reports to the Web with Oracle Reports Services

24.7 General Layout Guidelines

This section outlines guidelines that you can follow when designing your reports layout to improve performance: ■ Fetching Ahead ■ Bursting and Distribution

24.7.1 Fetching Ahead

Oracle Reports enables you to display data such as total number of pages or grand totals, in the report margins or on the report header pages. This option, although useful, forces the entire report to be fetched ahead. Fetching-ahead requires the entire report to be processed before the first page can be output. The usual model is to format pages as and when required. Although the fetched-ahead functionality does not affect the overall time the report takes to generate, it affects the amount of temporary storage required and the time taken before the first page can be viewed. This is an example of perceived performance as opposed to actual performance. If the report is to be output to the screen in a production environment, fetching ahead should be avoided unless the performance variance is deemed acceptable.

24.7.2 Bursting and Distribution

With report bursting, a report layout can be made up of three distinct sections: header, body, and trailer. A report can comprise all three sections, or it can be viewed as three separate reports within one report. Oracle Reports enables you to control bursting at group record level offering a further level of granularity. This is made possible by the Distribution and Repeat On properties for each individual section. The performance gain is evident when bursting is used in conjunction with distribution, allowing each section of a report to have multiple formats and sent to multiple destinations. Once the distribution options has been set the report needs only to be run once, to be output to multiple destinations with a single execution of the querys. Previously the report had to be executed multiple times. When you implement bursting and distribution in a report, you can generate section-level distribution by setting the Repeat On property for a section to a data model break group, which generates an instance of the section for each column record of that break group. Then, you can distribute each instance of the section as appropriate for example, to individual managers in the MANAGER group. If you set the Repeat On property for more than one of the Header, Main, and Trailer sections of a report, all Repeat On property values must be set to the same data model break group. If the Repeat On property for any one of the Header, Main, and Trailer sections is set to a different data model break group, Oracle Reports raises any of the following messages: REP-0069: Internal Error REP-57054: In-Process job terminated: Terminated with error REP-594: No report output generated

24.8 Running the Report

You can further affect the overall performance by setting specific runtime options: Diagnosing and Tuning Oracle Reports 24-43 ■ Oracle Reports Builder automatically runs an error check on paper layout definitions and bind variables. Set the runtime parameter RUNDEBUG=NO to turn off this extra error checking at runtime. ■ For JSP report definitions, Oracle Reports Builder performs tag validation and checks for items such as duplicate field identification or malformed attributes. This feature is useful only during the design phase, but not in the production environment. By default, tag validation in Oracle Reports Services is off. To turn this option on, specify VALIDATETAG=YES in your HTTP request for example, http:my.server.commyreport.jsp?VALIDATETAG=YES. ■ By default, the RECURSIVE_LOAD command line keyword used by both rwrun and rwservlet commands is set to YES, causing invalid external references of PLSQL program units to automatically recompile. Set the RECURSIVE_LOAD=NO in a production environment, because this is useful only in a development environment. ■ For SQL queries, Oracle Reports takes advantage of the Oracle databases array processing capabilities for data fetching. This allows records to be fetched from the database in batches instead of one at a time, resulting in fewer calls to the database. However, array processing requires more memory on the execution platform to store the arrays of records returned. To reduce the network load number of network trips in a production environment, set the value of the ARRAYSIZE command line keyword defined in kilobytes to a large value. ■ As discussed in Section 24.4, Tuning Reports Server Configuration , when running a large number of reports with Oracle Reports Servlet rwservlet or Reports Client rwclient, set the EXPIRATION command line keyword to reflect the maxQueueSize and cacheSize values. For example, if the queue element in the server configuration files specifies maxQueueSize=6000, you can keep a maximum of 6000 jobs in the job queue. If you run more than 6000 jobs within a day, with EXPIRATION=1440 1 day, you may lose some of the jobs even before the EXPIRATION time is met because Reports Server will remove the jobs to maintain the maxQueueSize and server stability, even though the jobs have not expired. Additionally, the cache element in the server configuration file should specify sufficient cacheSize should be allocated in order to maintain the 6000 jobs. As a general guideline, set EXPIRATION, maxQueueSize, and cacheSize according to the number of jobs you will run in one day. ■ Set the LONGCHUNK command line keyword to as large a value as possible, if your report uses the LONG, CLOB, or BLOB data types to retrieve large amounts of data. This reduces the number of increments taken by Oracle Reports to retrieve long values. On an Oracle database server, use the more efficient CLOB or BLOB data types, instead of LONG or LONG RAW. ■ If the Paper Parameter Form is not required, set the PARAMFORM command line keyword to NO. ■ Use the COPIES command line keyword carefully when printing to PostScript. Setting COPIES to a value greater than 1 requires that Oracle Reports save the pages in a temporary storage, in order to collate them. This increases the amount of temporary disk space used and the overhead of writing additional files results in slow performance. Note: Using VALIDATETAG=YES slows performance.