Add logging for latency in historic queries