Home » Performance » MySQL » More on autoincrement vs guid vs natural key
More on autoincrement vs guid vs natural key [message #3526] Fri, 12 September 2008 03:40 Go to previous message
AlexN  is currently offline AlexN
Messages: 20
Registered: October 2007
Location: Moscow,Russia
Junior Member
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 ?



Read Message
Read Message
Read Message
Previous Topic:Speed up large table SQL select query.
Next Topic:Slow Log Analyser
Goto Forum:

  


Current Time: Fri Jul 10 03:45:01 EDT 2009

Total time taken to generate the page: 0.18490 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.