Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sample question about views and indexes
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