Materialized Views for Query Rewrite

Oracle 9i Rel 2 Ver. Windows 2000 Advanced Server

I am administering a datawarehouse and have been asked to improve the performance of reports being created and run by Cognos.  I want to create materialized views and use query rewrite.  Can somebody explain the steps to plan and implement this?  

I have a couple of sample reports.  I'm trying to decide whether or not to do this top down or bottom up from the report.  I'm thinking it would be better to implement a consistent vision across the whole star schema rather than try to do this one view and one report at a time.

If I don't do top down, the number of tables in the first report is 12.  I'm thinking I have to do this in small chunks joining three or four tables in a view.  If I do that will all of them have to be full refresh?

Please answer the following questions:
Is it best to look at the data model and implement mviews based on the key relationships between fact and dim? or, look at the (35) reports and try and create mviews that support various reports?

A few tables in the view, or many?

We don't have many space limitations.  The db is only about 15 g in size and I have 300 g available.  The db is only really used from 8-6 Monday through Friday so I can refresh etc outside those hours.

If I'm not asking the right questions or approaching this correctly please suggest another direction.  
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Please answer the following questions:
Is it best to look at the data model and implement mviews based on the key relationships between fact and dim? or, look at the (35) reports and try and create mviews that support various reports?

---->Of course, take a look at the reports first. What tables need to be joined to present the information to complete the report. I am sure that 35 reports must have focused on a common set of tables. From there, you can take a look at the table schema from PK-FK point of view(or FACT -DIMENSION point of view), they are sometimes equivalent in DATA warehouse env.

A few tables in the view, or many?

From Oracle9i, you can have as many table in the mw as you want.
But since the refresh of Materialized view is really a tricky issue, you should balance the number of tables in the MW, refresh frequency, refresh data load, and time, etc. You can get a best estimate by studying your reports and DW schema carefully.
It may not be your database at all...How do things perform outside of Cognos.  What are you using to build your cubes?  Can you explain your environment?  How many fact tables, dimensions?
DonFreemanAuthor Commented:
The cubes are created and ETL is being done using Informatica power mart.  It's a communicable disease reporting database with three fact tables, investigation_fact and disease_rpt_fact are the two main ones, and followup_fact.  There are 21 dimension tables with about another 10 or so helper tables. Examples of dimension tables are jurisdiction, location, person, disease, time, etc.

This is all kind of anticipatory, our user base is going to go from 50 to 400 in the next couple of months as we go into full production. The database was created on Oracle Standard and we just got an Enterprise license last week so we don't have any of the Enterprise Edition data warehouse features enabled.  We felt the most valuable things to implement and the order we would implement would be mviews, bitmapped indexes, partitioning.... We have about 10 more weeks, essentially to redesign the application, before we reach peak load. We're thinking this isn't going to hold up when we get 400 users on board.  
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Yes, by upgrading your oracle database to EE version , alone is a big help.

just thinking about the capability added, Materialized views, Bitmapped Indexes, partitioning ..they all are essential ingredients for the success of a databwarehouse database.

You go right ahead.
KongAWS Certified Solutions Architect - ProfessionalCommented:
15GB datawarehouse?! :-)

I agree, upgrade to EE ASAP, start integrating partitioning, bitmap (join) indexes - you may need to turn them off for ETL as they'll cause all sorts of locking issues if you have them on during your load. Is parallel query available in standard edition?

We tested Cognos during the POC, there's a query rewrite feature which you should use. From memory, Cognos sucks all your data into cubes so the likelyhood of queries hitting the actual database is very small - that's why they're hardware heavy...
DonFreemanAuthor Commented:
Cognos has a drill-through capability.  We build six cubes from the database which currently satisfies most users.  When we are fully up and running I think we will have a lot more drill through activity hitting the database.  I can't see a use for bitmap join indexes and materialized views at the same time on the same tables. It seems kind of redundant.  If I create a materialized view using columns from four tables that are normally joined what's the point of creating a bitmap join-index on the same tables?  Am I missing something here?
KongAWS Certified Solutions Architect - ProfessionalCommented:
Bitmap join indexes (BJI) take considerably less space than MVs.

With BJIs you don't have to worry about query_rewrite_integrity & state of MVs, and/or MV logs.

BJIs improves complete rebuilds on multijoin MVs :-)

Using one and/or the other is dependent on requirements, don't treat these two features as an exlusive OR.

Hope that helps

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.