﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / SQL Server 2005 General Discussion  / How to execute Index? / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 13:17:49 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: How to execute Index?</title><link>http://www.sqlservercentral.com/Forums/Topic899464-149-1.aspx</link><description>I got it thanks</description><pubDate>Fri, 09 Apr 2010 06:29:27 GMT</pubDate><dc:creator>chandrasekaran.ganapathy</dc:creator></item><item><title>RE: How to execute Index?</title><link>http://www.sqlservercentral.com/Forums/Topic899464-149-1.aspx</link><description>I got it. Kingston explained well. thanks</description><pubDate>Fri, 09 Apr 2010 06:27:34 GMT</pubDate><dc:creator>subramanian22</dc:creator></item><item><title>RE: How to execute Index?</title><link>http://www.sqlservercentral.com/Forums/Topic899464-149-1.aspx</link><description>[quote][b]chandrasekaran.ganapathy (4/8/2010)[/b][hr]Nice explanation. But I dint get how it is related to the database. Are you meant that if i can pull the data where index no is 3 I can use that index. is it right? But I dint find any index no. assigned to the data. Can you give example with the small sample data.[/quote]I don't understand your question.  Not sure what you mean about index numbers.</description><pubDate>Fri, 09 Apr 2010 06:21:45 GMT</pubDate><dc:creator>GSquared</dc:creator></item><item><title>RE: How to execute Index?</title><link>http://www.sqlservercentral.com/Forums/Topic899464-149-1.aspx</link><description>[quote][b]chandrasekaran.ganapathy (4/8/2010)[/b][hr]Hi Kingston and all,Got it. I have read some article. So If i make a query likeSelect * from employeeId where employeeId between 'xxxxxx' and 'xxxx'or Select * from employeeId where employeeId &amp;gt; 'xxxxx'.These kind of query will be fetched from the database too fast using index.Please correct me if i am wrong.[/quote]Depends. If the optimizer thinks that using the index will be a faster method to fetch the required data it will use your index and fetch the data. But if it decides otherwise, it will not use your index.And did you download the book from the link provided by GSquared? I don't think you did and if you did you haven't read it. It is a free download and it will have answers to most of your questions.</description><pubDate>Fri, 09 Apr 2010 00:30:03 GMT</pubDate><dc:creator>Kingston Dhasian</dc:creator></item><item><title>RE: How to execute Index?</title><link>http://www.sqlservercentral.com/Forums/Topic899464-149-1.aspx</link><description>Hi Kingston and all,Got it. I have read some article. So If i make a query likeSelect * from employeeId where employeeId between 'xxxxxx' and 'xxxx'or Select * from employeeId where employeeId &amp;gt; 'xxxxx'.These kind of query will be fetched from the database too fast using index.Please correct me if i am wrong.</description><pubDate>Thu, 08 Apr 2010 22:29:20 GMT</pubDate><dc:creator>chandrasekaran.ganapathy</dc:creator></item><item><title>RE: How to execute Index?</title><link>http://www.sqlservercentral.com/Forums/Topic899464-149-1.aspx</link><description>Nice explanation. But I dint get how it is related to the database. Are you meant that if i can pull the data where index no is 3 I can use that index. is it right? But I dint find any index no. assigned to the data. Can you give example with the small sample data.</description><pubDate>Thu, 08 Apr 2010 22:18:21 GMT</pubDate><dc:creator>chandrasekaran.ganapathy</dc:creator></item><item><title>RE: How to execute Index?</title><link>http://www.sqlservercentral.com/Forums/Topic899464-149-1.aspx</link><description>[quote][b]chandrasekaran.ganapathy (4/8/2010)[/b]Here What is the use of creating Index?[/quote]Allow me to answer you with a question... What is the use of having an index in a book?   perhaps to allow you to find the page where some information you are looking for is instead of having to read the whole book from page one?</description><pubDate>Thu, 08 Apr 2010 12:35:17 GMT</pubDate><dc:creator>PaulB-TheOneAndOnly</dc:creator></item><item><title>RE: How to execute Index?</title><link>http://www.sqlservercentral.com/Forums/Topic899464-149-1.aspx</link><description>What a question :hehe:</description><pubDate>Thu, 08 Apr 2010 08:55:12 GMT</pubDate><dc:creator>vidya_pande</dc:creator></item><item><title>RE: How to execute Index?</title><link>http://www.sqlservercentral.com/Forums/Topic899464-149-1.aspx</link><description>You don't select directly from the index.  You select from the table.If the index is appropriate, SQL Server will use it when you do that.To really "get" indexing, you need to take a look at the subject of "execution plans".  RedGate has a good book on that subject, which is free (to download).  Here's the link: [url]http://www.red-gate.com/about/book_store/sql_server_execution_plans.htm[/url]The author is a regular on this site, and very, very knowledgeable about SQL Server.</description><pubDate>Thu, 08 Apr 2010 06:55:47 GMT</pubDate><dc:creator>GSquared</dc:creator></item><item><title>RE: How to execute Index?</title><link>http://www.sqlservercentral.com/Forums/Topic899464-149-1.aspx</link><description>You can never execute an Index. To get the data you will have to always [b]SELECT *[/b] from the table.And one more thing, is you get some script from somewhere make sure you understand it completely and then try it. You can Google for lot of information on Indexes.</description><pubDate>Thu, 08 Apr 2010 06:45:14 GMT</pubDate><dc:creator>Kingston Dhasian</dc:creator></item><item><title>How to execute Index?</title><link>http://www.sqlservercentral.com/Forums/Topic899464-149-1.aspx</link><description>I have gone through this example for index in one site.create table employee1(    ID          int,    name        nvarchar (20),    salary      int,    city        nvarchar (20),    region      nvarchar (20) )    insert into employee1 values ('1',  'Jason', '40420',  'New York', 'W')insert into employee1 values ('2',  'Robert','14420',   'Vancouver','N')insert into employee1 values ('3',  'Celia', '24020',   'Toronto',  'W')insert into employee1 values ('4',  'Linda', '40620',   'New York', 'N')insert into employee1 values ('5',  'David', '80026',  'Vancouver','W')insert into employee1 values ('6',  'James', '70060',   'Toronto',  'N')insert into employee1 values ('7',  'Alison','90620',  'New York', 'W')insert into employee1 values ('8',  'Chris', '26020',  'Vancouver','N')insert into employee1 values ('9',  'Mary',  '60020',  'Toronto',  'W')CREATE UNIQUE CLUSTERED INDEX IX_EmployeeON Employee1 ([Id], [Name] DESC)GOI have done this.But I am givingSelect * from IX_Employee.It is not working.Here What is the use of creating Index?</description><pubDate>Thu, 08 Apr 2010 06:22:26 GMT</pubDate><dc:creator>chandrasekaran.ganapathy</dc:creator></item></channel></rss>