uses cache to get rid of unnecessary cursor iteration in basic_stats