measure query times in ms