Performing operations in SQL is faster than performing them in Reports Builder or PL/SQL. The following are the most common cases where using SQL would improve performance:
Use a WHERE clause instead of a group filter or format trigger to exclude records.
Use the SUBSTR function to truncate character strings instead of truncating in Reports Builder.
Perform calculations directly in your query rather than in a formula or summary.
Rationale: SQL can perform calculations more quickly than a summary or formula. WHERE and SUBSTR can reduce unnecessary fetching because they operate on the data during rather than after data retrieval. Improvements in performance become more noticeable when retrieving thousands of records versus a few records.
Copyright © 1984, 2005, Oracle. All rights reserved.