There are several points that need to be considered.
As usual I agree with Steven's views.
I partially agree with Bradley's comment about using the database to do the heavy lifting.
It is important to understand the value of a separate reporting database.
A seperate reporting database can deliver a number of benefits including:
- No impact on production database when a report retrieves 7 years of workorder data - Yep I have seen that
- Ability to use PL/SQL to generate summary tables etc. IBM Support have previously advised against manipulating data at the SQL level because it can cause other problems - I have seen Workorder saves fail because of deadlocks created by PL/SQL code running in the database
- Ability to manually create/manage indexes without risking Maximo drop the indexes when it rebuilds the tables - As my RFE says this is a major pain.
It isn't a particularly hard job to create an additional data source pointing at the reporting database. some thought is required if the replication is not immediate.
Individual SQL statements need to be optimised and this step is often overlooked.
I talk about the importance of that in the "Database performance & DBA tips mini-series" in my blog (which I know you read)
Re your query about detecting if the materialised view is out of date.
select 1
from all_mviews
where mview_name = 'WO_MV'
and trunc(last_refresh_date) = trunc(sysdate)
Your query is not taking advantage of the power of BIRT.
An alternative approach would be:
Have two datasets
dataset 1 - compare the last_refresh_date against sysdate. Fetch method sets a "mvDataIsOutOfDate" flag to indicate if the MV is up to date.
dataset 2 - execute the query to retrieve the data.
controls used to show data from dataset2 - these have an expression that controls the visibility e.g if mvDataIsOutOfDate = false
If the mvDataIsOutOfDate flag is true then the crontrols will be hidden and the query in dataset2 will not be executed
Re my RFE about adding support for Function Based Indexes above - Periodically I talk to Dev and I will see what the latest on this was.
I know we were working on a solution that would allow us to automatically recreate FBI indexes after they had been dropped.
------------------------------
Mark Robbins
Support Lead/Technical Design Authority / IBM Champion 2017 & 2018 & 2019 & 2020 & 2021
Vetasi Limited
https://www.linkedin.com/pulse/maximo-support-advice-from-non-ibm-engineer-article-mark-robbins/------------------------------
Original Message:
Sent: Thu July 15, 2021 02:47 PM
From: User1971
Subject: Precompute data for BIRT reports?
Function-based indexes might also be an option:
RFE: Add support for Function Based Indexes (FBI) to Maximo DB Configuration
https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=44977
It sounds like IBM rejected the RFE to support FBIs. But I don't think that would prevent us from creating FBIs outside of Maximo.
@Steven Shull or @Mark Robbins might know more about that.
Steps (from RFE):
1. standard indexes need to be created in DB Cfg
2. standard index is dropped
3. FBI index is created
4. Maximo is restarted.
#Maximo
#AssetandFacilitiesManagement