[support] week's and month's popular content

Usamah M. Ali usamah1228 at gmail.com
Wed Dec 24 07:00:39 UTC 2008


Which Drupal version are you using? Drupal 6 has by default a 'popular
content' block that does exactly what you want. Anyway there's not any
reason you would use the accesslog table for node view stats.

The only caveat to what Drupal does is that it updates view count on
every page request, which can hog performance on highly trafficked
websites.

Regards,
Usamah

On Fri, Dec 12, 2008 at 10:07 PM, Vasanth Govind <govivasanth at gmail.com> wrote:
> Hi all,
>  The requirement is to display the popular content of this week and popular
> content of  this month.
>  This is done by fetching the content which has more number of hits or
> views.
>  We have Drupal's node_counter table in which we have the totalcount and
> daycount fields which has views per day and total.
>
> Any one help me optimized MySQL query which  can fetch this details in a
> quicker way.
> Currently the data is fetched from accesslog table which is not much
> optimized and very slow.
> Thanks in advance.
>
>
> Thanks & Regards
> Vasanth Govind
>
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>


More information about the support mailing list