• Resolved eginventors

    (@eginventors)


    I have a high-traffic site, and the table wp_popularpostssummary is getting huge,
    now my question is if I enable Log limit for example 30 days, is that mean that post views for more than 30 days will LOST and will be zero?

    and if yes, what is the suggestion from your side to prevent or just not to increase the table size dramatically?

    Thank you

    • This topic was modified 6 years, 11 months ago by eginventors.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @eginventors,

    The size of the table -according to people who know more than me in this area- isn’t really important:

    The most important scalability factor is RAM. If the indexes of your tables fit into memory and your queries are highly optimized, you can serve a reasonable amount of requests with a average machine.

    I believe WPP’s database tables are properly indexed and I’m pretty sure WPP’s database queries have been optimized as much as possible as well.

    If you’re noticing performance issues then chances are your server’s RAM isn’t enough to handle the amount of requests it currently gets. In that case, enabling the Log Limit feature can help since it’ll reduce the size of the database table by automatically deleting rows older than N days (so yes, this data will be lost and “will be zero”).

    Alternatively, you could also try enabling the Data Sampling feature. It’ll write a lot less to the database and the table should be more compact as well.

    Hope that helps!

    Thread Starter eginventors

    (@eginventors)

    Many Thanks

    • This reply was modified 6 years, 11 months ago by eginventors.
    Thread Starter eginventors

    (@eginventors)

    Hello, just want to be sure, and sorry if it seems a stupid question,

    My website has posts with high rate reading and also posts with a low rate reading,

    so I set Data Sampling to 50 ,

    now the question

    if the post with low rate reading, let’s say it will continue count 50 view after a month due to its low rate reading,

    does the plugin will really count the reading 50 view over a month period OR it will maybe lose counting and begin from 0 due to the long period ( month ) and low rate reading?

    Plugin Author Hector Cabrera

    (@hcabrera)

    Somehow I missed your new comments!

    Everytime someone visits any of your posts, it’ll increase its views count by 50 regardless of time:

    How does Data Sampling work?

    Every time someone visits one of your posts / pages, WPP will generate random number between 1 and N, being N the sample rate. If the random number turns out to be 1, then the views count of that post / page will be incremented by N.

    The general idea is that in theory it should take N tries to hit number 1 (the probability of that is 1/N). In the long run, it’ll increase the views count value by 1 for each visit without constantly querying the database.

    Do make sure to use the right sampling rate for your site:

    The default value is 100, recommended for sites with 125k / 250k visits per day.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Log limit question’ is closed to new replies.