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: 466

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

Packt Publishing announces "Advanced Oracle PL/SQL Developer's Guide"

My fondness for database development is flaring up again. Gladly I would like to share the announcement of my upcoming book "Advanced Oracle PL/SQL Developer's Guide - Second Edition" by Packt Publishing. The area of the focus is same i.e. Oracle PL/SQL but this version is largely revamped to whisk with Oracle Database 12c features and applications. While the first edition will always remain close to my heart, the second edition is a sheer investment of my experience attained so…

Continue

Posted by Saurabh K. Gupta on July 27, 2015 at 9:41pm — 1 Comment

What Benefits Does an MCSE Certification Carry?

MCSE certifications are the most popular certifications around the world. And, their popularity isn't without reason. In the following post I have highlighted the benefits that you can derive from an MCSE certification, so as to help you gauge how useful it can be for your career. Read on to know.…

Continue

Posted by Michael Warne on May 28, 2015 at 1:32am

Default Login Form customize

Dear All, I want to customize oracle 10g default login page. How can I do this. I attached the login page for better understanding.

Posted by Shakaouth Shanto on May 19, 2015 at 10:00pm

Live SAP Hybris Online Training Classes at VirtualNuggets

Web URL      :  http://www.virtualnuggets.com/sap-hybris.html

Email              :  info@virtualnuggets(dot)com

Contact           :  +1-7076668949(USA)         +91-8885560202(India) 

 

Live SAP Hybris Online Training Classes at VirtualNuggets

 

SAP Hybris is a standout amongst the most widely recognized e-commerce platforms       on the Internet…

Continue

Posted by Vasu Buddi on May 12, 2015 at 11:14pm

© 2015   Created by Steve Karam.

Badges  |  Report an Issue  |  Terms of Service