I've a voting system which is actually simple.
vote_id, user_id, article_id
I need now to be able to fetch the best voted article per day, week, month, year, forever.
I though I could add a DATETIME column and then use mysql function to retrieve vote BETWEEN or something and use DATE INTERVAL and other DATE OPERATIONS.
I also think I could denormalize and store "day of the year", "week of the year", "month of the year", "year", in columns for performance, I'll be able to fetch easily votes for one given day, or month.
Also, I'm wondering if I need to do it from a calendar point of view, it means "per month" may not be from "1 to 31" but from "12 to 12" crossing a two monthes.
Any ideas/feedbacks?