Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: SQL index


Message #1 by mahesh.kava@p... on Fri, 5 Jan 2001 13:31:24 -0000
SQL does not require indexes to order data.  Indexes are used as a tool
to improve performance in joins and in sorting data.  You can sort you
data on any field in a table by using the "Order By <field name>".  This
works with or without indexes.

There are two types of indexes, standard indexes and clustered indexes.
You can read more about them in Books On Line (BOL). 

For those pure SQL people out there, change the word <field> to
<column>.  I never know which one to use...

Believe it or not, sometimes it is faster to use order by on fields that
do not have indexes associated with them.  Also, if your table is used
for a lot of updates or inserts, multiple indexes dramatically slow down
those operations.

Hope this helps...

Mike

-----Original Message-----
From: mahesh.kava@p...
[mailto:mahesh.kava@p...]
Sent: Friday, January 05, 2001 5:31 AM
To: sql language
Subject: [sql_language] SQL index

hi friends!
I have created indexes on 3 tables on a particular column,however,none
of
the columns appear in a sorted order.
is it that in sql server,indexs r only for faster data retrevial.
to get the sorted order do we only have to use 'ORDER BY'
thanks in advance
regds
mahesh


---
You are currently subscribed to sql_language as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-sql_language-$subst('Recip.MemberIDChar')@p2p.wrox.com

  Return to Index