Changed implementation of statistics.
Need refactor. Very slow.
Optimized statistics with JDBC result set.
Refactored project, removed dead code.