Hello everybody!

I have a question about an article which was published in the May
issue of Oracle magazine by Tom Kyte.
http://www.oracle.com/technology/oramag/oracle/09-may/o39asktom.html

My problem is with the last example:

He issues a 'select count(*) from emp' and compares the performance
depending on some existing/non existing constraints. And there is also
a materialized view involved, which is used to optimize the query in
the second case.

What I don't understand is that how can the optimizer use the mat view
instead of the table? I mean the mat view might contain outdated data
and when we are querying 'emp', we are curious about the live data,
aren't we?

What if I create the mat view, then I add more lines to the 'emp'
table and then run the 'select count(*) from emp' query? If it goes to
the mat view, it will return wrong row number for the 'emp' table.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Oracle-DBA-OCP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.co.in/group/Oracle-DBA-OCP?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to