Hi @narolles, it’s been a while!
If using Redis/Memcached/etc. isn’t an option for you at the moment, you can:
- Enable Data Sampling to reduce the number of database writes which should help performance. Make sure to set your Sampling Rate according to your current traffic levels.
- Enable Data Sampling and Data Caching for more performance. The latter keeps the running of potentially expensive database read operations to the minimum. Make sure to read the documentation for more details.
- Migrate your website to a hosting provider that does provide access to Redis/Memcached/APCu.
In the configuration there is “log limit” which allows you to destroy the “number of views” but after I suppose that the information no longer appears for old articles
The Log Limit feature will delete views data that’s older than N days but the total views count doesn’t get affected by this. It’s just the data related to Time Ranges (eg. Last 24 Hours, Last 7 Days, etc.) (I probably should add this observation to the Wiki.)
Would it not be possible to provide a sql table with a function that would copy the number of views on a given date …. to freeze it … much like the limit of comments from a date
Possible? Yes. However, I imagine that would probably have an impact on performance: WPP would then have two database tables growing constanly. The plugin would double its database read operations under some circumstances/configurations as well. It’d also introduce more complexity to the plugin which I’d rather avoid if possible.
Hello Hector
Thank you for your clear, quick and simple answers.
I have studied your answers
So I asked my host to put Memcached (it can not Redis)
it’s a bit complex to configure but it’s short
I activated the WPP cache at 30 min – I prefer this than the sampling, it’s easier to check – I will see if I reduce or lengthen after experience –
Regarding the logs limits I write 365 days because I have a page with
the stats for one year
https://www.jardinerie-animalerie-fleuriste.fr/articles-populaires/
I hope I have understood everything and thank you again for your help
take care of yourself
Luc
Oups I see the trending show widget is out of order 😉
i removed the wpp cache and perahps the config of memcached
Follow
yes i m desappointed …i removed the define view in memcached
So I asked my host to put Memcached (it can not Redis)
it’s a bit complex to configure but it’s short
Yeah, configuring Redis/Memcached/etc on a website is not a simple task but it’s completely worth it once it’s set up and running. You (almost) never have to think about it again and gives your website a nice performance boost.
I activated the WPP cache at 30 min – I prefer this than the sampling, it’s easier to check – I will see if I reduce or lengthen after experience
30 minutes should be fine. You could go even lower than that if you wanted to now that you have Memcached enabled on your site but feel free to experiment with all this and use whichever configuration fits the best for your use case.
I hope I have understood everything and thank you again for your help
take care of yourself
It seems you did, and you’re welcome!
Edit: sounds like I spoke too soon haha
Make sure Memcached is properly configured first or else none of this stuff will work as expected. Reach out to your developer (or to your hosting if they offer that service) and have them look into this for you.
-
This reply was modified 6 years, 1 month ago by
Hector Cabrera. Reason: Updated after reading the last two comments left by OP
Thank you @hcabrera
I successfully installed Memcached
I could follow all your advices except that of data catching
when I put the “define” in wp config in true …. the widget “trend now” no longer works in back and front end
thanks a lot
Luc