I was pretty much a complete noob, when it came to SQL. The bottleneck was (like it is often) the data transfer. Most stats are just a ratio of sums of things, like SUM(VPIP Flag) / SUM(Hands) but I have been transferig lanrge data sets into my ResultSet object and I was later looping through it in Java.
Now I use SUM() in my SQL statements and only transfer a single integer to Java. It brough the computation of some stats from 340ms down to 1ms, should be fast enough now.
You should do most of your computation in SQL if you have similar problems and filter the data as much as possible with WHERE statemets.Statistics: Posted by HontoNiBaka — Tue May 27, 2014 7:46 am
]]>