Implementing efficient counters with MySQL

July 1st, 2007  |  Published in Blogroll, CakePHP, Code Development

Implementing efficient counters with MySQL:

On many web sites you would see a counter how many time given object - blog post, forum thread, image, movie etc was viewed. This is sometimes handy feature but it can be rather expensive from performance point of view.

The nasty thing with counters as they are implemented the most trivial way - they convert read load to write load. When you would simply fetch given object information now you do not only fetch the data but also update the view counter.

Some good tips for a big performance and scaling tweek for your tables

(Via Planet MySQL.)

Leave a Response