Hi,

I didn't get chance to use Materialized views in my job yet but to sharpen my skills for future, I was working on it.

I created a table EMP from HR.EMPLOYEES table. EMPLOYEES table has 107 rows in it. I copied it to EMP table multiple times and total number of rows in it are 54784 now.

After setting SET TIMING ON

1. First, I ran SELECT statement on EMP table without creating Materialized View and
2. then I create a Materialized View called EMP_MV and
3. I reran the SELECT statement both on EMP table and EMP_MV view.

Timing came almost same in both cased (with and without Materialize view).

Can somebody pls show me a scenario, which can really make me believe that Materialize Views are really worth to use?

Thanks in advance...!! Will appreciate your response..!!!

--------------------------------------------------------------------------------------------------------------------------------------------
SQL> select count(1) from emp;

COUNT(1)
----------
54784
--------------------------------------------------------------------------------------------------------------------------------------------

Execution Plan
----------------------------------------------------------
Plan hash value: 3956160932

--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 56469 | 7334K| 141 (1)| 00:00:02 |
| 1 | TABLE ACCESS FULL| EMP | 56469 | 7334K| 141 (1)| 00:00:02 |
--------------------------------------------------------------------------

54784 rows selected.

Elapsed: 00:02:19.61
--------------------------------------------------------------------------------------------------------------------------------------------
Execution Plan
----------------------------------------------------------
Plan hash value: 1199708657

---------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
---------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 44487 | 5778K| 127 (1)| 00:00:02 |
| 1 | MAT_VIEW REWRITE ACCESS FULL| EMP_MV | 44487 | 5778K| 127 (1)| 00:00:02 |
---------------------------------------------------------------------------------------

54784 rows selected.

Elapsed: 00:02:19.61

--------------------------------------------------------------------------------------------------------------------------------------------

Views: 453

Comment by Eddie Awad on August 20, 2010 at 12:57pm
I suggest you read the Basic Materialized Views chapter in the Oracle Database Data Warehousing Guide first.
Comment by Parry on August 20, 2010 at 1:04pm
Sure. Thanks Eddie.

Comment

You need to be a member of Oracle Community to add comments!

Join Oracle Community

Oracle Community On

I'm not a fan of advertising, and so I will not be including any advertisements on OracleCommunity.net. However, managing this community does not come without cost! If you are willing to donate to help pay for the monthly community fees and domain services I accept Bitcoin and PayPal donations.

Donate Bitcoins

Badge

Loading…

Blog Posts

Join and Union examples of related tables to show different SQL and esProc syntax

Join multiple tables with “join”

The SQL…

Continue

Posted by Jim King on October 15, 2014 at 12:02am

profiles in Oracle DBA

I've one question it is related to Oracle DBA, I've just read about password settings in profiles concept, i'm little bit confusing on PASSWORD_REUSE_MAX and PASSWORD_REUSE_TIME, and I understand something about these two topics. I updating here what i'm understand when I was reading about this, so tell me is it right or wrong.

1) PASSWORD_REUSE_MAX: This setting is used for reusing of old passwords. The functionality of this setting is restricts reusing of old password for…

Continue

Posted by Bhagya Raj Katta on October 10, 2014 at 7:21am

Dynamic Performance views-what are they?

A little bit about how exactly Oracle retrieves the information from Dynamic performance views. Read more here : http://suntrupth.blogspot.in/2014/10/dynamic-performance-views-what-are-they.html

Posted by Suntrupth Yadav on October 9, 2014 at 9:30am

Oracle Masters?

Where can I ask my Oracle / PlSQL related doubts from masters ?

Posted by Mohammed on September 24, 2014 at 6:07pm

© 2014   Created by Steve Karam.

Badges  |  Report an Issue  |  Terms of Service