Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Db2 Index in table search

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Keanehelp

New User


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

PostPosted: Mon Jan 19, 2009 3:15 am    Post subject: Db2 Index in table search
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

Site Director


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

PostPosted: Mon Jan 19, 2009 7:11 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts TBSARG - Deleting the search criteria... ISPFHerc TSO/ISPF 5 Thu Dec 14, 2017 8:18 am
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us