I am building a website that shows recommend pages for users.
Users only click next button to look at different recommend web pages.
I wanna check every single activities that users can make.
So, I will check page views that users actually see.
1. there is a 'user_pageview' column for each users.
2. the numbers will increase every time if users click next button.
I can send a query to update data every single time.
However, I believe this step will be annoying to my server.
So, I am thinking to save the data into session for a while and save it later.
What do you think?
Yes it will be “annoying your server”.
The same way you are “annoying” your car by riding it.
A database server’s intention is to operate the data – store, retrieve, filter, etc.
There is nothing essentially wrong with storing data in the database.
There may be a problem, yes, with index rebuilding (if any).
However, there would be a problem with tracking user session too.
So, I won’t bother with session until I have certain problem with database (which most likely won’t occur ever).