View previous topic :: View next topic
|
Author |
Message |
madhus
New User
Joined: 18 May 2010 Posts: 12 Location: chennai
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
askarshakethj
New User
Joined: 23 Jun 2010 Posts: 2 Location: Pune
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
madhus
New User
Joined: 18 May 2010 Posts: 12 Location: chennai
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
And I just hope Peter...err...umm ah ..comment form Dick is not ignored! |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
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 |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
|