If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Index reverse scans

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-27-03, 00:21
cchattoraj cchattoraj is offline
Registered User
 
Join Date: Mar 2003
Posts: 343
Question Index reverse scans

Does anyone know if there is any overhead associated with using the reverse scan option on indexes?

The perf manual says that the a leaf page contains references to both the page before it and the page following it - does not seem like much overhead considering the benefits that it can give. However, just wondering how much more space that could end up occupying. Will appreciate if someone can share their experience.

udb eee 7.2 fp 7 on aix 433 ml 11
Reply With Quote
  #2 (permalink)  
Old 09-29-03, 02:32
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Try this:

1. Create index without reverse scan.
Sample:
CREATE INDEX schema.index_name ON schema.table_name (col1 asc, col2 asc);

2. reorgchk on schema.index_name
Look for ISIZE parameter with is "index size".

3. drop index and create index with reverse scans:
Sample:
CREATE INDEX schema.index_name ON schema.table_name (col1 asc, col2 asc) ALLOW REVERSE SCANS;

4. reorgchk on schema.index_name
Look for ISIZE parameter with is "index size".

5. Compere the ISIZE parameter of step 2 and step 4.

Hope this helps,
Grofaty
Reply With Quote
  #3 (permalink)  
Old 09-29-03, 03:33
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
I think there is more than space considerations involved. I think there are things that need to get updated when index entries are added (and sometimes changed), especially at the page level. So that involves some CPU, and possibly bufferpool storage and disk access.

I think a lot of people have wondered the exact same thing, but I have assumed it must not be trivial or else it would be the default. But that is just a wild guess.
Reply With Quote
  #4 (permalink)  
Old 09-29-03, 10:59
cchattoraj cchattoraj is offline
Registered User
 
Join Date: Mar 2003
Posts: 343
Thank you for your inputs - space is a big consideration at this time, since we're running low on it. But I must admit that Marcus has made some good observations about index page splits which I have concerns with as well. Especially if this is applied to a clustering index.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On