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

Db2 Index in table search


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

New User


Joined: 27 May 2008
Posts: 71
Location: USA, CA.

PostPosted: Mon Jan 19, 2009 3:15 am
Reply with quote

Hi,

I have doubt regarding DB2 indexes. In a where clause if we are using indexed column and we are also using a non indexed column then how DB2 will search the table? Is it like

First sort on indexed column and within those indexed column search and match rest of the conditions in where clause?

Any help is much appreciated.

thanks

Nitin.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jan 19, 2009 7:11 am
Reply with quote

Hello,

Believing you were asking a strictly db2 question, i moved your topic to the db2 part of the forum icon_smile.gif

DB2 will evaluate the query and attempt to determine the optimal way to access the data. If there are 2 columns named in where, the access is usually "driven" as you suggest - by the column with the index and then the other column.
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 Load new table with Old unload - DB2 DB2 6
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top