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 -> Re: Sample question about views and indexes

Re: Sample question about views and indexes

From: Keith Boulton <boulkenospam_at_globalnet.co.uk>
Date: 1997/12/24
Message-ID: <34a1464a.15452577@read.news.global.net.uk>#1/1

On Fri, 19 Dec 1997 14:51:17 -0500, Abu M Rahman <arahman_at_nko.com> wrote:

>If there is a index match in the table : YES it uses index
>
>Marc Brevet Lepreux wrote:
>
>> does Oracle use table's indexes when I select a rows by a view of this
>> table?
>
>
>
>--
>-------------------------------------------------------------------
>Abu M Rahman | PHONE: (904) 737-3181 ext. 237
>Database Administrator | FAX : (904) 739-1984
>NKO, Inc. | Email: arahman_at_nko.com
>-------------------------------------------------------------------
>
>

This need not be the case. Oracle attempts to merge the view selection criteria with the query that defines the view. If it cannot do this, it builds a result set based on the view and then scans that based on your selection criteria.

It's a long time since I looked at this in detail, but I remember in version 6 that any view involving a UNION would result in the entire result set of the view being generated. I'm sure there are other examples for later versions of the database. Received on Wed Dec 24 1997 - 00:00:00 CST

Original text of this message

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