I have examined several WordPress plugins for counting number of article views and I was shocked! All of them are using update_post_meta() function which is the worst case scenario for article counting. Why?
Because update_post_meta() function stores information in postmeta table. The type of this table by default is MyISAM. Which means that every time a person is viewing an article, update_post_meta() function updates the postmeta table by locking it with TABLE_LOCK. Meaning that during update process all other processes (such as getting article view count from database) are put to a WAITING pool.
For small websites this is more than OK! But for large ones, with high traffic, it is a disaster and significant performance degradation. Imagine a website with 500 hits per second.
Based on your server configuration, starting from some point visitors should wait for server response because for viewing article WordPress calls get_post_meta() function for meta information, but on the same time update_post_meta() function LOCKS entire postmeta table for updating article view count!
Quick Tip #3 – Article View Counter for WordPress
Do not use update_post_meta() function for counting number of article views OR change postmeta table type to InnoDB.