IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 Index scan and sequential scan


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mosinjamadar

New User


Joined: 26 Sep 2007
Posts: 42
Location: pune

PostPosted: Mon Feb 11, 2008 11:33 am
Reply with quote

Hi

If I have defined INDEX on COLUMN1 COLUMN2 COLUMN3 and in SELECT
query in WHERE clause i will specify only COLUMN1 COLUMN2 still DB2 does INDEX scan or it will be sequential scan
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Mon Feb 11, 2008 12:43 pm
Reply with quote

maybe column1 and column2 are not good candidates for index or try runstats.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Feb 11, 2008 3:13 pm
Reply with quote

Quote:

sequential scan

do you mean table scan?
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Mon Feb 11, 2008 4:28 pm
Reply with quote

now that I've read again the post:

DB2 should choose Index Access with Matchcols=2.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Cobol file using index COBOL Programming 2
No new posts DL/I status code AK for GU call using... IMS DB/DC 1
No new posts Add column to existing records using ... JCL & VSAM 2
No new posts choice of clustering index DB2 3
No new posts Secondary index error while loading d... IMS DB/DC 2
Search our Forums:

Back to Top