Implement cache table to speed up 90% (down to ms instead of s) complex queries such as calculating averages and total counts