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

What is a Clustered Index


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

New User


Joined: 05 Jan 2007
Posts: 5
Location: Bangalore

PostPosted: Fri Jan 12, 2007 9:22 am
Reply with quote

Hi,

I want to know the difference between a clustered Index and a non-clustered index. And also why we need a clustered Index.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Fri Jan 12, 2007 10:30 am
Reply with quote

Quote:
I want to know the difference between a clustered Index and a non-clustered index

Let's make it little simpler, Clustered Index is Primary Index and Non-clustered Index is Secondary Index.

Now suppose an index "EMP_IDX" has been defined on a column say "DEPT" on a TABLE "EMP_TBL", so in case of a clustered index all the values for the same "DEPT" would be stored in the same block/area of database memory else its a Non-clustered index.

Quote:
And also why we need a clustered Index.

Now how do you expect for a Select query to behave where you want to have all EMP_NAME for any specific "DEPT".
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