MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Index/Table Space scan

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
edkir98
Beginner


Joined: 27 Aug 2007
Posts: 102
Topics: 42
Location: Chennai

PostPosted: Tue May 26, 2009 4:45 am    Post subject: Index/Table Space scan Reply with quote

I have a query

Code:
SELECT IXCOL1,
           IXCOL2,
            NONIXCOL3
   FROM TABLE1
  WHERE IXCOL3 = :VALUE

TABLE1 has 3 indices IXCOL1/2/3 and NONIXCOL3 is a non-indexed column.

Now when the above query is executed the explain information shows that tablespace scan is used. When i remove NONIXCOL3 from this SELECT list like
Code:
SELECT IXCOL1,
           IXCOL2
   FROM TABLE1
  WHERE IXCOL3 = :VALUE
then it goes into index scan.

Will adding a non-index column in the select statement affect the nature of the scan?
_________________
Thanks
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Tue May 26, 2009 9:12 am    Post subject: Reply with quote

edkir98,

Read this for a better understanding of DB2 Access paths

http://www.ibm.com/developerworks/db2/library/techarticle/0301mullins/0301mullins.html

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group