Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7776063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:46:58+00:00 2026-06-01T17:46:58+00:00

I am working on a video site. It’s pretty heavy so far as traffic

  • 0

I am working on a video site. It’s pretty heavy so far as traffic is concerned. I am trying to rank videos by the number of times videos are viewed. I.e. video A gets 5.2K views and B gets 5k views, so A ranks above B. But I want to calculate the views each video gets in a week (or a month, if needed) and then rank them by view counts.

I first created a table that contains views only. i.e. every time, a video is viewed a row is inserted into the table along with timestamp and video id. That was a horrible decision. Since the traffic was heavy, the table became huge, affecting performance. Is there is a better way to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T17:47:00+00:00Added an answer on June 1, 2026 at 5:47 pm

    I would have the table storing the total number of views for a particular video against the week number. Just create/increment as needed.

    i.e. have fields video_id, week_number, and total_views.

    Have a good index (i.e. on week_number, total_views) so that the top ten is easy to extract.

    Also have a cron job to delete old data (or archive it). That should keep the tables size manageable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a video site that has different movies and videos which
The site I'm currently working on has a series of videos on a carousel
I'm trying to set up my site to use HTML 5 videos. The mp4
I'm working on a video site at the moment and a lot of the
I am working on a videos sharing web site and I want to take
I'm trying to embed a youtube video on my site and it doesn't seem
I've been working on an iPad-specific site that uses HTML5 video and though I've
i have this site i am working on: www.guygar.com the quicktime renders the video
I am working on creating a Video sitemap for a site that has hosted
So I'm working on a mobile site that has some videos on it. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.