Fix Cassandra query sorting, and reporting the total time spent waiting for cassandra.