I've read several articles about autoincrements and I'm still in doubt. I understand that long GUIDs results in large index files and possibly slow access. Also I tested 32-byte GUIDs versus autoincrenent keys and found a very little difference. Also I've been told by our admins that autoincrement columns are bad in scaling. They asked us, programmers, to change application logic in orde to use natural keys or UUIDs. Is it possible to make a little summary on this subject ? Advantages and disadvantages of autoincrements, uuids and natural keys could depend on:
* table size
* key size
* whether the key is composite or not
* number of connections
* what else ?
Currently I have two cases. A table that requires many inserts from many connections. This table has several millions of rows and acts as a kind of a log. Another table holds session information. There are several thousand rows, but there is a very intensive process of selection-insertion-deletion of rows.
Currently the first table uses autoincrement and the second one uses GUID. Is this correct ?
* table size
* key size
* whether the key is composite or not
* number of connections
* what else ?
Currently I have two cases. A table that requires many inserts from many connections. This table has several millions of rows and acts as a kind of a log. Another table holds session information. There are several thousand rows, but there is a very intensive process of selection-insertion-deletion of rows.
Currently the first table uses autoincrement and the second one uses GUID. Is this correct ?
Comment