Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does SQL Compact Edition Support Clustered Indexes?

Does SQL CE support clustered indexes?

like image 711
Brian Avatar asked Mar 26 '09 20:03

Brian


3 Answers

MSDN says about the NONCLUSTERED argument:

This is the only supported index type
like image 109
qux Avatar answered Nov 20 '22 13:11

qux


Judging by CREATE INDEX syntax for SQL Server Compact Edition, the only supported index type is NONCLUSTERED.

like image 22
karlgrz Avatar answered Nov 20 '22 13:11

karlgrz


Most file based databases do not support clustered indexes. It would require a rewrite of the entire index if you inserted a new row out of order. Since this is expensive (and a blocking operation) most file databases do not allow it.

BUT, you do normally gain a notion of natural order. The order you insert in is the order they are on disk. This is something you do not have with full SQL Server which is always reclaiming free space from previous pages.

like image 4
Jason Short Avatar answered Nov 20 '22 12:11

Jason Short