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

What is an index?


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

New User


Joined: 18 May 2010
Posts: 12
Location: chennai

PostPosted: Fri Jun 18, 2010 6:47 pm
Reply with quote

What is an index ? How it increases performance of system? what is diference between index and primary key? Can we create index on any table?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Jun 18, 2010 6:56 pm
Reply with quote

publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.intro/db2z_indexes.htm
Back to top
View user's profile Send private message
askarshakethj

New User


Joined: 23 Jun 2010
Posts: 2
Location: Pune

PostPosted: Wed Jun 23, 2010 12:06 pm
Reply with quote

madhusudhanreddysurakanti wrote:
What is an index ? How it increases performance of system? what is diference between index and primary key? Can we create index on any table?


Hi,

Index is a pointer to the columns in the table. While retrieving a columns using a query, the use of index is efficient as it saves time and using index is efficient in many cases.

Primary Key is a key which is unique, not null and it has no duplicate values(Ex. Employee ID in case of employee) ie., distinct.

An Index can have NULL values also. Its just a pointer. Yep. We can create index on any table.

Hope this helps!

Thanks,
Askar
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jun 23, 2010 3:16 pm
Reply with quote

Askar,

if you are going to paraphrase definitions, do it correctly.

Quote:
Index is a pointer to the columns in the table.


should be:

Quote:
Index is a pointer to rows in the table.
Back to top
View user's profile Send private message
madhus

New User


Joined: 18 May 2010
Posts: 12
Location: chennai

PostPosted: Thu Jun 24, 2010 11:43 am
Reply with quote

Thank you Askar.

You said "the use of index is efficient as it saves time and using index is efficient in many cases"
Can you please explain how indedx is efficient and how the using of index works while retreiving . Can you explain how index works
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jun 24, 2010 5:42 pm
Reply with quote

As they say,
Quote:
to understand indexes, you can think about the "index in a book". If you are trying to find a reference to a particular term in this large book, you can look up the word in the index, which is arranged alphabetically. When you find the word in the index, one or more page numbers will be listed after the word. These numbers point to the actual pages in the book where information on the term can be found.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jun 24, 2010 5:49 pm
Reply with quote

And I just hope Peter...err...umm ah ..comment form Dick is not ignored!
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Thu Jun 24, 2010 7:26 pm
Reply with quote

There are entire books written on the subject.

I doubt if anyone here has time to rewrite one of them into this little box.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Jun 24, 2010 9:33 pm
Reply with quote

This reminds me of a post on the automotive forum:

What is a transmission?

How can a transmission improve the performance of the automobile?

What is the difference between an automatic and a manual transmission?

Please tell me how a transmission works.
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