Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a table from which 99% of the time I retrieve only 1 row. Searching is done using a clustered index (which is only 20 bytes long). My row size however, is 800 bytes (fixed size). Do you think this row size is a problem in the given scenario?

If it makes any difference - this table will be containing 10s of millions of rows.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Row size will make little difference if you are querying by that index every time. The index structure will be searched for the one row, and the final index entry will point directly to the data block holding the row.

If you regularly query just part of the row, then adding extra indexes might help as you can include more then one field in the index meaning that the final row lookup does not have to happen, but for a single row lookup this isn't going to make a lot of difference unless you have a great many in a short space of time.

Searching 10s of millions of rows is not much slower than searching millions of rows (or hundreds of thousands, and so on) if the search is using an appropriate index rather than table scanning.

share|improve this answer
    
Maybe you should add that the index must be reordered/rebuilt on a regular basis –  Scoregraphic Nov 23 '09 at 10:55
    
Thanks. This is exactly the kind of answer I was looking for. –  niaher Nov 23 '09 at 11:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.