mv distinct to query slave