There are a few ways to implement counters. Even though it’s not
a complex feature, often I see people having problems around it.
This post describes how bad implementation can impact both
application and MySQL performance and how to improve it.
A customer asked me for help with performance problem they were
facing. I logged into their database and found many client
connections waiting for table locks. Almost all threads were
stuck on one, small table called hits. What was the
The problem was related to the way they developed a very simple
system for counting page views they later used in some reporting.
The table structure … [Read more...]