so here's the deal:
right now whenever the page is loaded a SELECT query is run to grab the data fields and an UPDATE query is run to update the view counter (views=views+1)
- any suggestions how I can optimize this?
For instance I noticed that YouTube doesn't update the view counter whenever the page is loaded, instead the views are cached and the count is updated every few hours. How does this work?
I should add that it's a MyISAM table type, so it's optimized for read queries.
right now whenever the page is loaded a SELECT query is run to grab the data fields and an UPDATE query is run to update the view counter (views=views+1)
- any suggestions how I can optimize this?
For instance I noticed that YouTube doesn't update the view counter whenever the page is loaded, instead the views are cached and the count is updated every few hours. How does this work?
I should add that it's a MyISAM table type, so it's optimized for read queries.