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

Will Indexing the primary key improve the join performance


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

New User


Joined: 01 Apr 2005
Posts: 11

PostPosted: Thu Jan 18, 2007 7:54 pm
Reply with quote

A query joins some 5 tables. Two fields of a table are used in the where conditions .One is a primary key and the other is not indexed. We have planned to improve the performance of the query by indexing it.
My question comes here. Can it be indexed alone(it is not unique) or
togather with the primary key to create a unique index.
Which will be better.
Can someone help me.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Jan 18, 2007 8:21 pm
Reply with quote

It can be indexed alone as a non-unique index and it can be indexed together with a unique index if you wanted that.
Back to top
View user's profile Send private message
rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Fri Jan 19, 2007 10:46 am
Reply with quote

i will go with william suggestion
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts FINDREP before JOIN DFSORT/ICETOOL 3
No new posts DFSORT Join Keys Controlcard DFSORT/ICETOOL 4
No new posts Queue application affecting performance CICS 12
No new posts To join 2 tables and to join 3rd tabl... DB2 8
No new posts Two where-criteria with GT - Performa... DB2 4
Search our Forums:


Back to Top