I am a fan of using GUIDs as primary keys. They are databaseindependent, object independent and I can either create them in myapplication or in the database (MySQL since 5.0 has had a UUID()function but since it does not replicate I don't use it normally...this has been fixed in 5.1 though).What I have heard for years was that Innodb didn't handle them verywell. I have had my doubts, but never taken the time to see if thiswas true or not.This week I finally got around to putting this to a test./mysqlslap --concurrency=1,50,100,150,200,250,300 --iterations=10 --number-int-cols=2 --number-char-cols=3 --auto-generate-sql --auto-generate-sql-add-autoincrement --auto-generate-sql-load-type=update --auto-generate-sql-execute-number=10000 --auto-generate-sql-unique-write-number=10 --auto-generate-sql-write-number=100000 --csv=/tmp/innodb-auto.csv --engine=blackhole,innodbSo 10K of rows, with increasing numbers of threads makingmodifications. Unlike a lot of tests I do this is a growth test...aka as a site would grow this is what you would see. Normally when Ilook at how SMP machines handle problems I am more interested inseeing how it would split the problem with more threads and more CPU.In this case I wanted to look at just how the database would behaveas a site grew.The test I am looking at is primary key focused, and its all updates.So a read is occurring and a write follows up.As you can tell from the graph, the overhead, as seen via blackhole,is nearly identical in cases where UUID() was used and Autoincrementwas used. The only issue I ran into was that Innodb started gettingdeadlocks when I cranked up the connections to 300 on my quad PPCrunning Ubuntu. I am going to play with this a bit further and see ifInnodb would have similar issues on a dual processor. The binlog wasnot enabled during any of these tests so the row locks that we seefor updates when running with statement based replication won't beseen (but I really want to see how that effects things!).Just to confirm results I am going run the same test but just do keylookups and see if any difference pops up. I am doubting it will butyou never know until you try :)