Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Oracle Views efficency

Oracle Views efficency

From: Jiggy <jshah_at_kpmg.com>
Date: Thu, 18 Nov 1999 12:37:11 -0500
Message-ID: <3834393B.22A57753@kpmg.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US