Re: Views on Views

From: Mark M. Vermeer <vermeer_at_cs.utwente.nl>
Date: 1996/11/15
Message-ID: <56it1u$h41_at_pandora.cs.utwente.nl>#1/1


In article <328BD999.118B_at_interlog.com>,

        John Parrott <spo_at_interlog.com> writes:
> I'm looking for pros and cons of using views.
>
> Suppose I create a complex view on a large table.
>
> Then I issue a statement like:
> select * from newview
> where field1 = XXXX
>
> Does the server first execute the statement in the view against the
> entire table then perform the second select statement which might limit
> the number of rows dramatically or is the server smart enough to limit
> the rows first then perform the functions in the view only on the
> limited result set.
>

That depends entirely on the quality of the query optimiser of the DBMS you're using. Similar questions can be asked for SQl queries not involving any view definitions. Although may smart optimisation techniques have been suggested in research, it is commonly known that the quality of query optimisers of commercial DBMSs varies strongly.

-- 
=========================================================================
Mark Vermeer		          e-mail: vermeer_at_cs.utwente.nl
Department of Computer Science	  tel: +31-53-4894626
Information Systems Workgroup	  fax: +31-53-4892927
University of Twente 		  WWW: http://www.cs.utwente.nl/~vermeer/
P.O. Box 217, 7500 AE Enschede, The Netherlands
=========================================================================
Received on Fri Nov 15 1996 - 00:00:00 CET

Original text of this message