Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: A question about performance
Hi,
CASE 1 is the correct one. Why use the index first and for every entry go to
the blocks on te table?
You have to full scan the data table blocks anyway, so just do it without
wasting time (and resources) reading the index and - after - going to the
table in a scattered way.
Anyway probe it and let us know the results.
HTH
Joselu
www.OraEs.com
Madrid (SPAIN)
> -----Mensaje original-----
> De: Weerd de E.C. Kirsten [SMTP:Kirsten.deWeerd_at_Oranjewoud.nl]
> Enviado el: miércoles 21 de junio de 2000 13:58
> Para: Multiple recipients of list ORACLE-L
> Asunto: RE: A question about performance
>
> I think performance will be about the same. You select all records in the
> table, no matter which statement you use. So evidently, Oracle will
> process
> every row no matter what.
>
> Greets,
>
> Kirsten
>
> > -----Original Message-----
> >
> > Hi All:
> > There is a question about performance.
> > Table name : subscriber , primary key : subscr_id , with
> > over 5000000 records .
> >
> > CASE 1 : select *
> > from subscriber ;
> > (FULL TABLE SCAN)
> >
> > CASE 2 : select *
> > from subscriber
> > where subscr_id > 0 ;
> > (USE INDEX)
> >
> > Could anyone tell me which ones performance is better , or
> > they are the same ??
> >
> > Thank you in advance.
> >
> >
> > Tiffany
> > E-mail tiffanydu_at_pcdc.com.tw
> >
> --
> Author: Weerd de E.C. Kirsten
> INET: Kirsten.deWeerd_at_Oranjewoud.nl
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Wed Jun 21 2000 - 06:28:14 CDT