Oracle Analytics Publisher

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

error using data mode property: Optimize Query Execution

Received Response
22
Views
4
Comments
Ayala01
Ayala01 Rank 1 - Community Starter

Hello everyone, a few days ago I experienced a new situation.


I have a report that extracts a large amount of data (over 100,000). I tried to optimize the execution time using a property of the data model. The execution time is faster, the number of records is the same, but for some reason the information varies in some cases. That is, if I compare the normal execution with the execution using that property, the data information varies in some records, but the amount is the same.
Do you know why this behavior occurs?

In my case, using that property does optimize the execution time; the number of records is the same, but the information varies.

Answers

  • Mallikarjuna Kuppauru-Oracle
    Mallikarjuna Kuppauru-Oracle Rank 8 - Analytics Strategist

    Hi @Ayala01

    Welcome to Analytics Community.

    Refer - Data Model Properties

    Select this property to allow the data processor to optimize the execution of SQL queries of parent and child datasets.

    Select this property only when the data model includes a parent-child hierarchy structure in a SQL dataset. Don't select this option for non-structured and non-SQL datasets.

    Are you using non-Structured OR non-sql Dataset?

    Regards,

    Arjun

  • Ayala01
    Ayala01 Rank 1 - Community Starter

    Hi @Mallikarjuna Kuppauru-Oracle , this is the diagram for you to have a better analysis.

  • Mallikarjuna Kuppauru-Oracle
    Mallikarjuna Kuppauru-Oracle Rank 8 - Analytics Strategist

    Hi @Ayala01

    We can't find based on diagram . do you have parent child data? for example refer below -

    OraFAQ Forum: SQL & PL/SQL » Oracle Display parent, child, grandchild hierarchy

    Regards,

    Arjun

  • Riyaz Ali-Oracle
    Riyaz Ali-Oracle Rank 6 - Analytics Lead

    Hi Ayala01,

    Potential Causes of Data Variation:

    1. Query Execution Plan Changes

    Optimizing execution time may have altered the query execution plan, causing different indexing or join strategies to be used.
    This can lead to variations in how data is fetched, especially if the query involves aggregations or joins.

    2. Parallel Processing Effects

    Some optimization properties enable parallel execution, which can cause slight differences in how data is retrieved.
    If the query is executed in multiple threads, the order of data retrieval might change, affecting certain calculations.

    3. Data Model Property Impact

    Some BI Publisher data model properties (like fetch size, caching, or query rewrite) can influence how data is processed.
    If caching is enabled, it might return slightly different results based on previous executions.

    4. Implicit Sorting Differences

    If the optimization removes an implicit ORDER BY, the data might be retrieved in a different sequence.
    This can cause variations in reports that rely on default sorting behavior.

    5. Oracle BI Publisher Performance Tuning Considerations

    Oracle provides best practices for optimizing BI Publisher reports, including avoiding excessive filtering and ensuring proper indexing.

    Oracle Business Intelligence Publisher Performance Recommendations for Fusion Cloud Applications (Doc ID 2800118.1)
    Oracle BI Publisher Best Practices for SaaS Environments (Doc ID 2145444.1)
    https://docs.oracle.com/middleware/bi12214/bip/BIPDM/GUID-478A2B1D-BC89-421E-9702-5749BA49EFD2.htm

    =======Please review the following best practices to be followed to create a data model =======

    Data model creation best practices:

    -> Edit data model -> click on Validate. Check if you see any 'Warnings' or 'Errors'. Note the warnings and errors, modify the SQL to avoid them.
    -> Analyze the explain plan and identify high impact SQL statements.
    -> Add required filter conditions and remove unwanted joins.
    -> Avoid and remove FTS (full table scans) on large tables. Note that in some cases, full table scans are faster and improve query fetch.
    -> Use SQL hints to force use of proper indexes.
    -> Avoid complex sub-queries and use Global Temporary Tables where necessary.
    -> Use Oracle SQL Analytical functions for multiple aggregation.
    -> Avoid too many sub-queries in where clauses if possible. Instead rewrite queries w
    -> Avoid group functions like HAVING and IN / NOT IN where clause conditions.
    -> Use CASE statements and DECODE functions for complex aggregate functions. Please refer below document for best practices.

    ========OTHER CONSIDERATIONS========

    • 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 <>