Skip to Main Content
  • Questions
  • Should we have Materialized Views on a database

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question.

Asked: August 14, 2017 - 6:15 pm UTC

Last updated: August 16, 2017 - 1:01 pm UTC

Version: 11.2.0.4

Viewed 1000+ times

You Asked

We are looking at possibly implementing materialized views (MV) in our database. What are the impacts with implementing MVs in the PeopleSoft database (i.e. performance, memory, space, etc.)

and Connor said...

Do you have any indexes in your current database ? I'm guessing you do.

Why do we have indexes ? Because servers are junk :-) If servers were perfect, we would *only* have tables, because all queries would be fast enough (with no indexes), and all constraints (uniqueness etc) could be checked in a nanosecond.

The *only* reason we have indexes is to satisfy those needs that we can't do with our tables alone (quick access, constraint implementation etc). Of course, for that benefit, we pay a price. Indexes

- consume space,
- need to be kept in sync (either in real time, or after the fact),
- may impose an overhead on the rate we can insert data into the database.

So how many indexes do we try to have ? *Just* enough. Not too many, and not too few.

Materialized views are *just* like indexes. They

- consume space,
- need to be kept in sync (either in real time, or after the fact),
- may impose an overhead on the rate we can insert data into the database.

but can give us benefits that outweigh those overheads.

So how many materialized view do we try to have ? *Just* enough. Not too many, and not too few.

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

A reader, August 15, 2017 - 1:34 pm UTC

Thank you very much Connor.
Connor McDonald
August 16, 2017 - 1:01 pm UTC

glad we could help

More to Explore

Design

New to good database design? Check out Chris Saxon's full fundamentals class.