Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make calculating most popular items more efficient #591

Closed
tjenkinson opened this issue Sep 22, 2015 · 2 comments
Closed

Make calculating most popular items more efficient #591

tjenkinson opened this issue Sep 22, 2015 · 2 comments

Comments

@tjenkinson
Copy link
Member

With the changes in #583 it should now be possible to make calculating the most popular items more efficient.

The current way is inefficient because previously there was no nice way due to how the view counts were stored.

It should now be possible to make a single nice query on the playback_history table to get the items ordered by the amount of view counts they have.

Before this can happen though the current values in initial_view_count fields in media_items_live_stream and media_items_video need moving to fake entries in the playback_history table. Would make sense just to create entries with session_id set to null and original_session_id set to 0000000000000000000000000000000000000000, where each entry has constitutes_view as 1.

@tjenkinson
Copy link
Member Author

@tjenkinson
Copy link
Member Author

#592
#593

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant