Add profile logs for Query and Exec