Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to know which index is used during the execution of sql

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

New User


Joined: 10 Jun 2005
Posts: 62

PostPosted: Thu Jun 16, 2005 3:50 pm    Post subject: How to know which index is used during the execution of sql
Reply with quote

How to know which index is used during the execution of sql
Back to top
View user's profile Send private message

dbaprasad

New User


Joined: 06 Jun 2005
Posts: 3
Location: pune

PostPosted: Fri Jun 17, 2005 2:25 pm    Post subject: Re: How to know which index is used during the execution of
Reply with quote

issue EXPLAIN command,
Back to top
View user's profile Send private message
Smitha

New User


Joined: 20 Jun 2005
Posts: 5

PostPosted: Tue Jun 28, 2005 2:03 pm    Post subject: Re: How to know which index is used during the execution of
Reply with quote

Hi,

During the execution of an SQL, if the WHERE clause contains any of the fields that is in the index, then it will use that particular index.

Suppose you have 2 indexes: X1: A,B
X2: Y,Z
Now your WHERE clause has the field B, then the first index will be used.

Indexes are used to improve the peformance of your query.

-Smitha.
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 Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm
No new posts Several errors during building altern... Andi1982 JCL & VSAM 11 Wed Jul 06, 2016 7:39 pm
No new posts Drop building Alternate Index for a p... bhavin.mehta JCL & VSAM 6 Mon Jul 04, 2016 3:47 pm
No new posts output DDname JESMSGLG job during exe... italo_pm TSO/ISPF 16 Tue Jun 21, 2016 11:13 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us