Added some excellent query stat logging.