[Plugin: Recently Popular] Why adding db row prt each page view ? (3 posts)

  1. saharusa
    Posted 6 years ago #

    In terms of months or years it means too many rows.

    In my opinion, table should look like this:

    ts (DATE)

    we loose ability to show post from last X hours but table will end up much smaller.


  2. ebiven
    Posted 6 years ago #

    Some people may want the hourly data. Even then you could aggregate by timestamp if you wanted to aggregate. I didn't want to aggregate. I wanted the most accurate representation possible. I even warn people with very busy blogs to not use this plugin.

    The plugin now allows you to purge data from the table through a settings page in the admin. Additionally, the table is indexed and the plugin first selects out only the rows that match the time criteria, making it very efficient as long as you use a reasonable timespan. Don't do "most popular for the last year" and you'll be fine in almost all cases.

    Finally, the plugin is licensed under the FreeBSD license precisely because I knew that it wouldn't do what everyone wanted. It can't be all things to all people. The FreeBSD license is as liberal as they come. Take it, make a fork, and make any changes you want. That's part of the beauty of open source.

  3. natarem
    Posted 6 years ago #

    FYI I took an older version of this plugin and paid a guy on RAC to make a new table which caches the data every hour. The cache refresh gets called on pageload so basically there's one semislow pageload per hour. I'm doing a 30 day timeframe on a pretty busy blog/news site fwiw. I can share the code but it won't work with the latest version of the plugin.

Topic Closed

This topic has been closed to new replies.

About this Topic