BI_Query_Tuning_Best_Practices
BI_Query_Tuning_Best_Practices
SQL Guardrail
Initiative
Best Practices for Writing BIP Reports
1. SQL Dataset:
• Only Return the Data You Need
• Use Column Aliases to Shorten XML File Length
• Avoid Using Group Filters in Data Model. Instead enhance Your Query
• Avoid PL/SQL function Calls in WHERE Clauses
• Avoid Use of the System Dual Table
• Avoid PL/SQL Calls at the Element Level
• Avoid Including Multiple Data Sets
• Avoid Nested Data Sets
• Avoid In-Line Queries (as summary columns)
• Avoid Excessive Parameter Bind Values
• The number of columns selected in SQL should not exceed 100
• Sorting should be done in the SQL, not during report formatting
• Avoid having WHERE clause on large tables with only NOT IN or <>
Oracle BI Publisher provides a mechanism to generate the explain plan, SQL monitoring reports and to enable SQL
session trace. This functionality is applicable to SQL statements executing against Oracle Database only. Logical
queries against BI Server or any other type of database are not supported.
• Generate an explain plan at the report level for all queries in a report
• Release 18 https://docs.oracle.com/en/database/oracle/oracle-
database/18/tgsql/introduction-to-sql-tuning.html
• Release 19 https://docs.oracle.com/en/database/oracle/oracle-
database/19/tgsql/introduction-to-sql-tuning.html
• Release 21 https://docs.oracle.com/en/database/oracle/oracle-
database/21/tgsql/introduction-to-sql-tuning.html