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 > Optimizer selects an Ix ...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-04-08, 08:57
matevido matevido is offline
Registered User
 
Join Date: Jan 2008
Posts: 2
Optimizer selects an Ix ...

We have this table:

Sel Name Owner T DB Name TS Name Cols Rows * * * * * * * *
----- ------------------ -------- - -------- -------- ------ ----------- * TABLAEXE TACX T DBTABLAX TSTABLAX 29 118


… with these Ixs :
Index Table C C C
Select Index Name Owner Table Name Owner U Cols G D L T
* * * * * * * * * *
------ ------------------ -------- ------------------ -------- - ------ - -
XABLAEXE TACX TABLAEXE TACX U 1 Y Y N 2
XABLAEX1 TACX TABLAEXE TACX D 1 N N N 2
XABLAEX2 TACX TABLAEXE TACX D 1 N N N 2


The Tspace has just been reorganized with RUNSTATS option.
When we do .. SELECT * FROM TACX.TABLAEXE, … we receive the rows ordered by index XABLAEX2.
Can anybody explain why the optimizer selects this Ix ?
Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 03-04-08, 10:14
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
What OS and DB2 version are you using. It would also help to see the DDL for the table and indexes. Also the distribution of the data with regard to the indexes would help.

Andy
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