Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
Administering
»
What is Index key Value in SQL SERVER 2005
16 posts, Page 1 of 2
1
2
»»
What is Index key Value in SQL SERVER 2005
Rate Topic
Display Mode
Topic Options
Author
Message
dsachu
dsachu
Posted Wednesday, February 06, 2013 5:15 AM
SSC Journeyman
Group: General Forum Members
Last Login: Monday, May 13, 2013 3:45 AM
Points: 90,
Visits: 335
Hi All,
I have a question because i confused........
>> What is Index Key Value ?
Can any one explain with proper example.
Regards,
Sachin.
Post #1416426
GilaMonster
GilaMonster
Posted Wednesday, February 06, 2013 6:50 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 4:58 AM
Points: 38,074,
Visits: 30,370
Indexing:
http://www.sqlservercentral.com/articles/Indexing/68439/
http://www.sqlservercentral.com/articles/Indexing/68563/
http://www.sqlservercentral.com/articles/Indexing/68636/
When you create an index, the column or set of columns that the index is created on is the key columns.
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #1416482
dsachu
dsachu
Posted Thursday, February 07, 2013 3:02 AM
SSC Journeyman
Group: General Forum Members
Last Login: Monday, May 13, 2013 3:45 AM
Points: 90,
Visits: 335
Hi Mr. Gail Shaw,
Don't mind but i am not getting below sentence.
The key columns (also referred to as the index key)
can be likened to the terms listed in a book index. They are the values that the index will be used to search for
. As with the index found at the back of a text book (see figure 1), the index is sorted by the key columns.
Regards,
Sachin.
Post #1416915
anthony.green
anthony.green
Posted Thursday, February 07, 2013 3:14 AM
SSCertifiable
Group: General Forum Members
Last Login: Wednesday, June 05, 2013 2:40 AM
Points: 5,075,
Visits: 4,833
dsachu (2/7/2013)
Hi Mr. Gail Shaw,
Don't mind but i am not getting below sentence.
The key columns (also referred to as the index key)
can be likened to the terms listed in a book index. They are the values that the index will be used to search for
. As with the index found at the back of a text book (see figure 1), the index is sorted by the key columns.
Regards,
Sachin.
1st Gail is a lady, so Mr. isn't the correct title to address her by.
2nd. I am sure you have read a book at some point (non-novel), at the back of the book there is an index, with a list of major topics, sorted in order from A - Z. That is the same methodology that a SQL index takes, it is a way to search quickly for what you want to find. Eg. I want information on Blocking, look in the index, find the page numbers which blocking is refered to, then you know where to look for the information. Same in SQL, I want to look for all people who have a first name 'Anthony', SQL looks in the index, finds the right page numbers where the name 'Anthony' appears and you get the information you need.
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1416920
dsachu
dsachu
Posted Thursday, February 07, 2013 3:40 AM
SSC Journeyman
Group: General Forum Members
Last Login: Monday, May 13, 2013 3:45 AM
Points: 90,
Visits: 335
Hi,
Sorry.....actual on the basis of Gail Photo, I assume he is Mr.
----------
I have Table ABC. Where I have one Column Country id on which I have implemented primary key .
What will be Index key value in below given table.
As per my understanding 1,2,3,4,5 will be the index key value......is am right ?
Country ID (PK) Country Name
--------------- --------------
1 UK
2 US
3 Japan
4 India
5 China
Regards,
Sachin.
Post #1416928
anthony.green
anthony.green
Posted Thursday, February 07, 2013 3:44 AM
SSCertifiable
Group: General Forum Members
Last Login: Wednesday, June 05, 2013 2:40 AM
Points: 5,075,
Visits: 4,833
dsachu (2/7/2013)
Hi,
Sorry.....actual on the basis of Gail Photo, I assume he is Mr.
----------
I have Table ABC. Where I have one Column Country id on which I have implemented primary key .
What will be Index key value in below given table.
As per my understanding 1,2,3,4,5 will be the index key value......is am right ?
Country ID (PK) Country Name
--------------- --------------
1 UK
2 US
3 Japan
4 India
5 China
Regards,
Sachin.
Correct, that ever is in the create index statement (exlcuding included columns) is the index key value
EG.
CREATE INDEX IDX_Name ON Ant (Name) - Index Key value is Name
CREATE INDEX IDX_Name_DOB ON Ant (Name,DOB) - Index Key value is Name & DOB
CREATE INDEX ISX_Name_DOB ON Ant (Name,DOB) INCLUDE (Salary) - Index Key value is Name & DOB
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1416930
dsachu
dsachu
Posted Thursday, February 07, 2013 3:59 AM
SSC Journeyman
Group: General Forum Members
Last Login: Monday, May 13, 2013 3:45 AM
Points: 90,
Visits: 335
Hi
Again some confusion.
-------------------------
>> CREATE INDEX IDX_Name ON Ant (Name) - Index Key value is Name
Ant is your column right ? and Name is one record in this column
>> CREATE INDEX IDX_Name_DOB ON Ant (Name,DOB) - Index Key value is Name & DOB
Ant is your column right ? and
Name and DOB is two different record
in this column
Please clarify.
Regards,
Sachin.
Post #1416938
anthony.green
anthony.green
Posted Thursday, February 07, 2013 4:01 AM
SSCertifiable
Group: General Forum Members
Last Login: Wednesday, June 05, 2013 2:40 AM
Points: 5,075,
Visits: 4,833
No, Ant is the table, the columns are Name, DOB, Salary.
Take a look at the CREATE INDEX syntax.
Indexes are not defined on row, they are defined on columns.
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1416941
dsachu
dsachu
Posted Thursday, February 07, 2013 4:04 AM
SSC Journeyman
Group: General Forum Members
Last Login: Monday, May 13, 2013 3:45 AM
Points: 90,
Visits: 335
Then what will be Index Key in your example.
Post #1416942
anthony.green
anthony.green
Posted Thursday, February 07, 2013 4:06 AM
SSCertifiable
Group: General Forum Members
Last Login: Wednesday, June 05, 2013 2:40 AM
Points: 5,075,
Visits: 4,833
The data inside columns inside the brackets.
The Index Key is the columns, the value is the data inside the columns
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1416943
« Prev Topic
|
Next Topic »
16 posts, Page 1 of 2
1
2
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.