Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
Introducing RBStats

This doesn't really solve the problem but you could save more data by redesigning your tables a bit. I assume one of your rows currently looks like this:

thread_id, thread_name, metric_count, date

So you have one row per thread per day (per metric). That's a lot of rows. The other way to do it is to have one row per thread and then one column per day, but then you would have an ever-expanding number of columns which is obviously stupid design. But you can have something in between, where you have one row per thread every week or every month, and then 7 columns for each day of the week or 31 columns for each day of the month. That would reduce your row count a lot, and I don't think Heroku is going to complain about a few more columns. wink
Reply

Yeah, it's that right now. Threads are normalized into a table, metrics are not. (post_count, view_count). TBH I think I'd rather pay the money rather than add complexity for a hack. smile I think I'm just going to chop off old months to keep rows under 9000 or something. But I'm pleasantly surprised this has consumers!
Reply

No better way to visually monitor progress toward a post domination victory! Great tool.

Played: Pitboss 18 - Kublai Khan of Germany Somalia | Pitboss 11 - De Gaulle of Byzantium | Pitboss 8 - Churchill of Portugal | PB7 - Mao of Native America | PBEM29 Greens - Mao of Babylon
Reply

Data still isn't updating.
More people have been to Berlin than I have.
Reply

This should be working now. I took the easy way out and it just stats purging old months if it sees the row count get too large. There's also a gap and a spike for today in the daily counts because the algorithm just subtracts the previous count from the count to get that delta, and it skipped a bunch of days.

If losing data for old months and games bothers anyone a lot, and you have unlimited money, send me a PM. rolf
Reply

How about purging the completed games?
More people have been to Berlin than I have.
Reply

This thread should be stickied...
Reply

Awesome, thanks for stickying this!
Reply

Thanks for the sticky. Is there anything else anyone would want to see out of this?

My list is maybe to find a free Python hosting solution with a database not limited to 10k rows, add an "include inactive" checkbox in the game select, and maybe add a way to limit the date range since, if the full data set were kept Highcharts would give the browser a real workout rendering the large and long games.

(Unfortunately I really like Heroku because the entire deploy is complete with only "git push heroku master", the local test build is exactly the same as production, and the interface to get the production log is really easy. E.g. I don't have to mess around with SCP and such or know how to restart services remotely.)
Reply

It doesn't seem to cope with PB18 - too many players?

If you're adding to your to do list I'd like a button that turns all the threads off and on for each graph. nod
Reply



Forum Jump: