Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Oracle Views efficency
Is my understanding correct that views are essentially pre compiled SQL
statements?
Lets say I create a view such that -
CREATE VIEW myview AS
SELECT name, department FROM employee;
And now, I execute the following SQL against the view-
SELECT name FROM myview WHERE department = 'HR';
My understanding is the that Oracle will -
1. Execute the view SQL
2. Filter the o/p of the view SQL where department = 'HR'
A coworker of mine argues that Oracle will add my WHERE clause to the view SQL and then execute it efficiently-
SELECT name FROM employee WHERE department = 'HR';
Any one has any idea who is right?
-jiggy Received on Thu Nov 18 1999 - 11:37:11 CST