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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: A question about performance

Re: A question about performance

From: Marin Dimitrov <marin_at_sirma.bg>
Date: Wed, 21 Jun 2000 13:54:44 +0300
Message-Id: <10535.109953@fatcity.com>


> 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 ??

  1. case 1 is better, because u avoid unnecessary accesses to index blocks
  2. anywise, Oracle won't use the index, because u're retrieving too many rows. Are u using optimizer hints to force index usage?

3.If u're really curious what happens , execute "SET AUTOTRACE ON" from SQL Worksheet, then execute your query and take a look at the reported statistics for number of blocks/rows accessed

best wishes,

    Marin


"The important thing for all of us is never look *at* the bars, look *through* them. Because if you keep looking *at* bars, you'll never get anything done, and you'll never have fun in life, any joy."

                                                  William Wharton, "Pride"
Received on Wed Jun 21 2000 - 05:54:44 CDT

Original text of this message

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