Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> Re: skip scan index

Re: skip scan index

From: Wolfgang Breitling <>
Date: Wed, 28 May 2003 06:30:02 -0800
Message-ID: <>

At 02:59 AM 5/28/2003 -0800, you wrote:
>Okay, I have a developer here who has been reading the docs (this can
>be dangerous!)
>we are adding functionality to one of our applications, this will
>involve using multiple fulfillment houses, so we'll be adding the
>fulfillment vendor id to the order table. Easy, this is not a problem.
>We want to be able to search by order date and by fulfillment vendor
>id/order date
>Traditional design would be to add two indexes: one on order date, and
>a concatenated one on fulfillment vendor id/order date.
>The developer is telling me to create a "skip scan index" instead of
>two different ones. MY reading in the FM tells me that skip scan index
>is not a type of index, but rather a way Oracle uses to use an index
>even if the leftmost column is not in the query.
>Is there any benefit in my building only the one index? Our order
>volume is not so high (and never will be) that there is a visible
>performance impact if I have the two indices.
>This is 9i,, will be upgrading to in the near future.
>Any suggestions/comments/war stories would be appreciated. I know I've
>seen Jonathan post on skip scan indexes before but I can't find the
>specific reference at the moment.

As others already said, it is a "index skip scan" access method, not a "skip scan" index. It is like an implicit OR where the optimizer looks up all distinct values for the missing prefix column(s) and augments the predicate (sort of) with these values and then does traditional index scans, ORing the results. It may not happen exactly that way, but conceptually that is what happens. From this you can deduce that it is an option only when there are relatively few distinct prefix values. In your case I doubt that the optimizer would ever choose a skip scan. Unless you have only a handfull (literally 5 or less) of fullfilment vendors. I don't have hard numbers as to the number of distinct prefix values beyond which a skip scan becomes too expensive compared to an FTS but during my tests in preparation for my IOUG presentation I had a hard time constructing an example where the optimizer would choose a skip scan - and I had tables with just 1 distinct prefix value.
My vote goes for your proposed two indices. Wolfgang Breitling
Oracle7, 8, 8i, 9i OCP DBA
Centrex Consulting Corporation

Please see the official ORACLE-L FAQ:
Author: Wolfgang Breitling

Fat City Network Services    -- 858-538-5051
San Diego, California        -- Mailing list and web hosting services
To REMOVE yourself from this mailing list, send an E-Mail message
to: (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 May 28 2003 - 09:30:02 CDT

Original text of this message