A control method for a heat pump water heater, wherein the method includes: a fitting calculation including: calculating a group of energy efficiency ratios of a compressor unit at different evaporating temperatures, different condensing temperatures and different compressor operating frequencies; fitting an energy efficiency ratio formula in which independent variables of the energy efficiency ratio formula include an evaporating temperature, a condensing temperature and a compressor operating frequency and the dependent variable of the energy efficiency ratio formula includes an energy efficiency ratio; calculating the first derivative of the energy efficiency ratio formula and setting an equation value of the first derivative to 0 to obtain an optimal compressor operating frequency formula in which independent variables include an evaporating temperature and a condensing temperature and the dependent variable includes an optimal compressor operating frequency; and a startup step including: turning on the heat pump water heater and periodically obtaining the evaporating temperature and the condensing temperature; calculating an optimal compressor operating frequency according to the optimal operating frequency formula, and adjusting the compressor accordingly. a fitting calculation including: calculating a group of energy efficiency ratios of a compressor unit at different evaporating temperatures, different condensing temperatures and different compressor operating frequencies; fitting an energy efficiency ratio formula in which independent variables of the energy efficiency ratio formula include an evaporating temperature, a condensing temperature and a compressor operating frequency and the dependent variable of the energy efficiency ratio formula includes an energy efficiency ratio; calculating the first derivative of the energy efficiency ratio formula and setting an equation value of the first derivative to 0 to obtain an optimal compressor operating frequency formula in which independent variables include an evaporating temperature and a condensing temperature and the dependent variable includes an optimal compressor operating frequency; calculating a group of energy efficiency ratios of a compressor unit at different evaporating temperatures, different condensing temperatures and different compressor operating frequencies; fitting an energy efficiency ratio formula in which independent variables of the energy efficiency ratio formula include an evaporating temperature, a condensing temperature and a compressor operating frequency and the dependent variable of the energy efficiency ratio formula includes an energy efficiency ratio; calculating the first derivative of the energy efficiency ratio formula and setting an equation value of the first derivative to 0 to obtain an optimal compressor operating frequency formula in which independent variables include an evaporating temperature and a condensing temperature and the dependent variable includes an optimal compressor operating frequency; and a startup step including: turning on the heat pump water heater and periodically obtaining the evaporating temperature and the condensing temperature; calculating an optimal compressor operating frequency according to the optimal operating frequency formula, and adjusting the compressor accordingly. <EOS>