Database indexes generally use the B-number Structure
Clustered index:
Because the order of the actual data is the same as that of the index (the data in the data page is arranged consecutively and in order)
Therefore, when performing a range search such as field> XX and field <xx2, you can read multiple data pages based on the preceding and following values.
It is much more economical to read Io data than non-clustered indexes. The retrieved data in the range is continuous data segments, and the data is relatively concentrated than non-clustered indexes.
Non-clustered index:
Composite Index:
Based on the index creation interface and the single-field index structure, the structure of the composite index can be inferred to be
Sort indexes by State ASC, endtime DESC, and employeid DESC first. Therefore, the best performance is available for where statements containing State.
References
Http://www.cnblogs.com/KissKnife/archive/2009/03/30/1425534.html
Http://www.cnblogs.com/Leo_wl/archive/2011/01/17/1937268.html
Http://www.cnblogs.com/wq3if2in/archive/2009/04/02/1428068.html
Http://blog.csdn.net/HEROWANG/article/details/4987066