Comments - Best surrogate key for clustered index for receiving mass inserts

5 years ago Kimberly Blum

The primary key is clustered, so records are written in order by the key. Clustered keys should be narrow/small (since it's used as the in every other index to point to the record), so an auto-incrementing integer is a really good choice, especially when insert performance is important. Page splits and fragmentation are going to depend, in part, on your fill factor. If the row is never going to be updated (only deleted), you should be able to calculate a good fill factor based on your average row size.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.