Figure 9: Average latency for query function.