December 23rd, 2013, 21:23
(This post was last modified: December 23rd, 2013, 21:24 by NobleHelium.)
Posts: 13,214
Threads: 25
Joined: Oct 2010
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.
December 23rd, 2013, 22:07
Posts: 3,199
Threads: 11
Joined: Jan 2010
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. 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!
December 23rd, 2013, 22:23
Posts: 7,658
Threads: 31
Joined: Jun 2011
No better way to visually monitor progress toward a post domination victory! Great tool.
December 31st, 2013, 09:50
Posts: 2,966
Threads: 19
Joined: Mar 2012
Data still isn't updating.
More people have been to Berlin than I have.
December 31st, 2013, 14:33
Posts: 3,199
Threads: 11
Joined: Jan 2010
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.
December 31st, 2013, 20:04
Posts: 2,966
Threads: 19
Joined: Mar 2012
How about purging the completed games?
More people have been to Berlin than I have.
January 28th, 2014, 04:41
Posts: 8,786
Threads: 40
Joined: Aug 2012
This thread should be stickied...
Completed: RB Demogame - Gillette, PBEM46, Pitboss 13, Pitboss 18, Pitboss 30, Pitboss 31, Pitboss 38, Pitboss 42, Pitboss 46, Pitboss 52 (Pindicator's game), Pitboss 57
In progress: Rimworld
January 29th, 2014, 01:25
Posts: 938
Threads: 3
Joined: May 2012
Awesome, thanks for stickying this!
January 29th, 2014, 09:18
(This post was last modified: January 29th, 2014, 09:23 by WilliamLP.)
Posts: 3,199
Threads: 11
Joined: Jan 2010
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.)
Posts: 8,786
Threads: 40
Joined: Aug 2012
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.
Completed: RB Demogame - Gillette, PBEM46, Pitboss 13, Pitboss 18, Pitboss 30, Pitboss 31, Pitboss 38, Pitboss 42, Pitboss 46, Pitboss 52 (Pindicator's game), Pitboss 57
In progress: Rimworld
|