Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Location
    india
    Posts
    24

    Unanswered: materialized views

    Can any body help me how to create materialized views in Oracle 8.1 database.

    What is the advantages of using materialized views instead of views.
    regards,
    Chary

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Materialized view are totally different from views. They used to be called "snapshots", which was a more descriptive name. They store a snapshot of data as it exists at a moment in time, and need to be periodically refreshed. The advantage is that the results of an "expensive" query can be "materialized" (stored) to be used by other queries. For example:

    create materialized view dep_sal_mv as
    select deptno, sum(sal) as sumsal
    from emp
    group by deptno;

    This MV could be used by the optimizer to speed up a query that required salaries summed to department level such as:

    select sum(sal) from dept where deptno = 10;

    There is a lot more to it than we could cover here, so I'll refer to you the docs at this point.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •