OBI-EE Caching Your Best Friend For Improving Performance A Case Study

Presented by: Narasimha Rao Madhuvarsu Kshitij Kumar

Introduction About Project Presentation context Issues faced Solution - OBIEE Caching Lessons learnt Summary Questions & Answers

Speaker(s) Profile
Narasimha Rao Madhuvarsu
OBIEE Implementation consultant 2 years of OBIEE Implementation experience
Pernod Ricard Wyndham Worldwide Welch’s

8 years of Oracle ERP experience

Kshitij Kumar
Vice President of BI Practice 10 years of BI experience 15 Years of IT experience

Visit us at Booth # : 4145

About the Customer – Pernod Ricard • Manufacturer and supplier of some of the most prestigious spirits and wine brands in the world • World Headquarters based out of Paris. NY . France. • US Headquarters – White plains.

About the Project Design and build Data Warehouse Capture huge amount of sales reporting data Develop Analytical reports to satisfy Sales and Marketing professionals Solution : Oracle Business Intelligence on Custom Data warehouse .

Report .Presentation Context • • • • Case study to show how OBIEE caching was used Describes the problems faced and Solutions to overcome performance issues To improve dashboard performance • Request vs.

NY/NJ & Atlanta in 2009 Founded in 2002 with >100 % growth every year for last 5 years: 2007 Inc.About Company – Apps Associates LLC Making Global Delivery Feel Closer To Home Offices in USA.S. Consultants: 75% former Oracle employees 7 . 500 list of fastest growing U. companies Over 250 employees (end of Q3 2008) with strong local presence Management & Sr. Germany and India MA (HQ).


Issues faced Frequent execution of requests returning large amounts of data Huge amount of data aggregation Low report response time .

called cache. to save frequently / recently accessed Requests result set Contd.. .Solution Caching • Oracle BI uses temporary storage area.

.Caching Methods Oracle BI Server Cache Oracle BI Presentation Server Cache Contd. .

INI’ – ENABLE (YES/NO) – DATA_STORAGE_PATHS .Oracle BI Server Cache Configuration • ‘NQSConfig.

Default is 1MB . there is no limit to the number of rows per cache entry • MAX_CACHE_ENTRY_SIZE – Specifies the maximum size for a cache entry.• MAX_ROWS_PER_CACHE_ENTRY Specifies the maximum number of rows in a query result set to qualify for storage in the cache When set to 0.

• MAX_CACHE_ENTRIES – Specifies the maximum number of cache entries allowed in the query cache. The default value is NO . Default is 1000. • POPULATE_AGGREGATE_ROLLUP_HITS – Specifies if data can be aggregated from an earlier cached query result set and create new entries for rollup cache hits.

– Ex: sin(cos(tan(abs(round(trunc(profit)))))) misses if value is set to 5 and hits if value is set to 7 or more. . • MAX_SUBEXPR_SEARCH_DEPTH – Describes how deep the hit detector looks for an inexact match in an expression of a query.• USE_ADVANCED_HIT_DETECTION – Describes whether each query is to be evaluated to determine whether it qualifies for a cache hit.

.Oracle BI Presentation Server Cache • Retains the content accessed in the active sessions. • Not Smart to work for subsets • Primary use is short term. when user navigation across pages in short period of time.. • Uses the request key and the logical SQL string to determine if subsequent queries can use cached results. Contd.

.Configure Presentation server Cache • Location of Presentation server cache $OracleBI_HOME\OracleBIData\tmp • Set parameters in instanceconfig. .xml • Location ($OracleBI_Home\OracleBIData\web\config) Contd.


..• CacheMaxExpireMinutes – Maximum number of minutes an entry can exist in the cache • CacheMinExpireMinutes – Minimum number of minutes an entry can exist in the cache • CacheMaxEntries – maximum number of open record sets that Oracle BI Presentation Services keeps open at any one time Contd.

Default Values – <CacheMaxExpireMinutes>60</CacheMaxExpireMinutes> – <CacheMinExpireMinutes>10</CacheMinExpireMinutes> – <CacheMaxEntries>100</CacheMaxEntries> Contd. ..

Bypassing Presentation services cache • By pressing the Refresh button in answers • By changing the underlying filters • Also be cleared from Settings Administration Manage Sessions Close All Cursors. .


Cache hit & miss • When a request result set can be retrieved from presentation services cache or BI Server cache then it is said to be cache hit. Contd.. . • When a request result set found in neither of the above places it is said to be a miss.

• Select Brand from Products.: Select brand. Sales_Qty_MTD from products where brand='Chivas regal'. quality . .g. or select subset of columns • Select brand. Contd. Sales_Qty_MTD from products – Run the same report with filters. quality..When Cache hit occurs ? • When query returns a subset of cached data – Run a report without filters • E.

quality from products where brand in ('Chivas regal'.. . quality from products where brand in ('100 Pipers'.'Chivas regal'.'Kahlua') – Ex: Select brand.• WHERE clause semantically the same or a logical subset – Ex: Select brand.'Kahlua') Contd.

• Logical subset of a literal comparison Ex: select Product. "Report Measures". "Report Measures".Brand."YTD Reporting N-1" from "Report Measures" where "Report Measures".Brand."YTD Reporting N-1" from "Report Measures" where "Report Measures"."YTD Reporting N-1"<10000 Select Product."YTD Reporting N-1"<5000 .

Log – Presentation server cache • When logical SQL and cache hit message in NQQuery. physical query sent to DB .log – Cache miss.Cache hit & miss • When no entry in NQQuery.Log – OBI server cache • When logical SQL and Physical SQL in NQQuery.



Purging Cache – Why & How • Process of deleting entries from the query cache • Cache entries may become Stale over time • How? – Manual – Automatic – Programmatic Contd. ..

..Manual Purge – Purge all/specific entries from repository ONLINE – Manage->Cache Contd.

..Automatic purge • Disable cache for the system • By setting the Cache Persistence Time field in the Physical Table dialog box for a particular table. • By setting up an Oracle BI Server event polling at table • As the cache storage space fills up Contd.


.Programmatically purge • Oracle BI Server provides ODBC-extension functions for purging cache • These functions gives choice and the timing flexibility of cache purge • Manage with the automation of event tables entries programmatically Contd. .

. ‘HFM_F_REPORT_RATIOS’ )..• SAPurgeCacheByQuery: Purges cache entry for a particular logical query – Call SAPurgeCacheByQuery(‘select lastname. • SAPurgeCacheByTable: Purges all cache entries based on a particular table – Call SAPurgeCacheByTable( ‘VENUS’. ‘APOLLO_BI’. firstname from employee where salary > 100000’ ). ‘PRNA’. Contd.

• SAPurgeCacheByDatabase: Purges cache entries pertaining to a specific physical database.• SAPurgeAllCache: Purges all cache entries – Call SAPurgeAllCache(). – Call SAPurgeCacheByDatabase( ‘VENUS’ ). .

Cache Seeding • A mechanism allows administrators to run requests on dashboard pages or requests stored in the Presentation Catalog or commonly accessed requests and create a Server cache • Selected requests are pre-run to increase response time when users actually run them Contd.. .

. NQCMD command – nqcmd -d AnalyticsWeb -u <User Name> -p <Password> -s <sql template file name with path> Contd..Cache Seeding Methods for Answers Requests • Using Logical SQL.

.Seed cache using Delivers – Create an iBot – Select the request/dashboard as content – Select “Oracle BI Server Cache” in destinations tab Contd. .



Cache Seed Using Briefing Books • • • • Create a Briefing Book Mark it as updatable Add dashboards as contents Create an iBot with Briefing Book as the delivery content • Purge cache after each ETL finish • Schedule iBot after each ETL run .





. Reduces network traffic. Contd. .Advantages Improves query performance. Reduction in Oracle BI server processing overhead.

Costs of Caching Disk space for the cache Administrative costs of managing the cache Potential for cached results being stale Minor CPU and disk I/O on server machine .

Approach : Pernod-Ricard-USA • Combination of multiple strategies followed – iBots – Briefing Books and iBots • Cache seed of logical SQL using NQCMD was ruled out – Manual effort – Maintenance – Specifying parameters prone to errors Contd.. .

– iBots are created with briefing books as delivery content – Destination is set to a dummy email – Cache purge and iBots scripts are scheduled as post ETL process. • For BI Publisher reports – Query results cached – Document cache is enabled .• Briefing Books & iBots – Frequently used performance intensive request dashboards are added to updatable briefing books.

Lessons learnt • Flood of requests submitted to BI server when cache seed scripts kicked • Huge CPU and resource usage at the time of cache seed • Other scheduled processes effects • Introduce delays in cache seed script to decrease sudden load on CPU & other resources .

Summary • Recommended when – Less amount of data & frequently used reports – Commonly used expensive requests – When original requests are expected to bring subset of cached data – Requests with out filter criteria if subsets are expected later • Not recommended when – Queries returns huge amount of data. equal to retrieving from database .

com 56 .com Kshitij.mlv@appsassociates.Thank You Visit us at Booth # : 4145 Questions/suggestions can be emailed to: narasimha.kumar@appsassociates.

..Caching for BI Publisher Reports • Set BI Publisher system caching parameters – Cache Expiration • Expiration period for dataset cache in minutes • Default is 30 minutes – Cache Size Limit • Maximum number of datasets can be maintained • Default is 1000 Contd.

– Maximum Cached Reports • Maximum number of reports to maintain in cache • Default is 50 • Report Level Parameters – Cache query results – Enable document cache • OracleBIData\cache .

Sign up to vote on this title
UsefulNot useful