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 > about list prefetch

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-08-12, 18:54
L_DBA_L L_DBA_L is offline
Registered User
 
Join Date: Sep 2009
Posts: 49
about list prefetch

DB2 9.1 for Linux

My question is related to Understanding DB2 Query Access Plans :: Chapter 6. The DB2 Optimizer :: Advanced dba certification guide and reference :: Misc :: eTutorials.org


Recognizing List Prefetch example:

Why is it necessary to do SORT and RIDSCN after IXSCAN? Aren't the keys returned by IXSCAN already sorted?

Does it make any difference if index TPCDL_SUMMARY2_IDX is a clustering index?



Unrelated question: Is I create an index on a VARCHAR column, can DB2 use it?
Reply With Quote
  #2 (permalink)  
Old 01-08-12, 20:31
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by L_DBA_L View Post
Why is it necessary to do SORT and RIDSCN after IXSCAN? Aren't the keys returned by IXSCAN already sorted?
Keys are, but RIDs are not, and you want them in sequence for efficient prefetch.
Quote:
Originally Posted by L_DBA_L View Post
Does it make any difference if index TPCDL_SUMMARY2_IDX is a clustering index?
Yes, it might eliminate the sort (or change the access plan altogether).

Quote:
Originally Posted by L_DBA_L View Post
Unrelated question: Is I create an index on a VARCHAR column, can DB2 use it?
Why not?
Reply With Quote
  #3 (permalink)  
Old 01-08-12, 21:44
fengsun2 fengsun2 is offline
Registered User
 
Join Date: Nov 2011
Posts: 124
list prefech is used to fetch non contiguous data more efficient。It actually sorted data by physical page number not by index key ,That is why sort operator is needed。
This fetch method can avoid data repage which will happen in the synchronize fetch when index clustor is low。。。。。
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