May 6, 2008 at 2:02 pm
Can any one explain what is sequential and covering index??
May 6, 2008 at 2:04 pm
Not sure what "sequential" index would be, unless you mean "clustered index", which stores the sequence of the rows in the table.
A "covering index" is an index that has all the columns that you're querying.
For example:
select Col1, Col2
from dbo.Table1
where Col3 = 5
A covering index for that query would be an index with columns "Col1", "Col2", and "Col3" in it. For the best results, it would have "Col3" first, since that's the one in the Where clause.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
May 6, 2008 at 2:13 pm
covering index may be a form of composite index................what does it mean but sequential index
May 7, 2008 at 8:09 am
I did a Google search for:
sql "sequential index"
And found a few articles. Some say one thing, some say another. You'll need to look at them yourself to figure out which one applies to what you're working on.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
May 7, 2008 at 8:35 am
Thanku.......they asked me in one interview
May 7, 2008 at 3:17 pm
I did a Goggle Search...Some say one thing, some say another...
If Google can't find it, it isn't real... 😛
on a side note, if everything you're comparing/returning is 'covered' by the covering index, you don't need to read the page.. or that's how I understand it
eg.
select c
from t1
where t1.a=1 and t1.b=2
If a,b, and c are all covered by the index, you can get some pretty good speed/concurancy. if a,b were only covered, you'd have to read from the page to get c. Over use can really bloat an index, be careful.
<-- is this correct?
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply