The other day a discussion in #mysql on freenode developed
concering possible issues arising from using auto increment on
primary key fields due to the danger of hotspots. Since I am
currently preparing a new talk first to be held at php|works on SQL
performance tuning I thought that the topic would make for a
perfect warming up post on the general topic.
Defining hotspots
I guess before diving into an actual discussion of the topic we
first need to define what a hotspot in RDBMS lingo is. "SQL
Performance Tuning" defines it as follows:
"A page in either the index or data file that every job wants to
access at the same time".
Now this sentence tells us that hotspots are concerned with
concurrency issues. So this indicates to us that the entire topic
is probably not much of an issue when we have few users accessing
the database at the same time. As a matter of …
[Read more]