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
 

 

What is an index?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: What is an index?
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

Senior Member


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

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

http://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    Post subject: Re: What is an index?
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: 6968
Location: porcelain throne

PostPosted: Wed Jun 23, 2010 3:16 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Thu Jun 24, 2010 5:42 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Jun 24, 2010 5:49 pm    Post subject:
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

Active Member


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

PostPosted: Thu Jun 24, 2010 7:26 pm    Post subject:
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: 672
Location: Pennsylvania

PostPosted: Thu Jun 24, 2010 9:33 pm    Post subject:
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    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 SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm
No new posts Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 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


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