View Single Post
Fearts
ferts of daeth
Join Date: Oct 2008
Old 10-21-2016 , 01:18   Re: [ANY] Player Analytics
Reply With Quote #324

Quote:
Originally Posted by theChaosCoder View Post
I made some bigger updates again to the webpanel. Added mutli server select, date selection is now globally available. And nearly every sql query uses a connect_date range now, so the performance should be better now on very large tables. Tested with a table of 6 mil records and a selection of 90 days on my small vps.

You also should add an index to connect_date to improve performance (if you're using phpmyadmin, just klick in the "index" link in the structure view of your table. If you receive a 502 timeout, don't worry, mysql is adding the index in the backgroud)

You can futher optimize your large table by adding partitons. use google

Next update will be charts stats charts

p.s. You can now use multiple databases (table name still fixed to "player_analytics". Will change what also later)
download here: https://github.com/theChaosCoder/player_analytics

Edit2: even better, use in addition a combined index: ALTER TABLE player_analytics ADD INDEX (server_ip, connect_date);
Very nice. Would be cool if you added a log in feature to this. Maybe something with Steam's OpenID or something. Basically something to restrict access to only people I want to be able to use this page.
__________________
Fearts is offline