  We propose a method named as double-scanning method, to improve the key rate
of measurement-device-independent quantum key distribution (MDI-QKD)
drastically. In the method, two parameters are scanned simultaneously to
tightly estimate the counts of single-photon pairs and the phase-flip error
rate jointly. Numerical results show that the method in this work can improve
the key rate by $35\%-280\%$ in a typical experimental set-up. Besides, we
study the optimization of MDI-QKD protocol with all parameters including the
source parameters and failure probability parameters, over symmetric channel or
asymmetric channel. Compared with the optimized results with only the source
parameters, the all-parameter-optimization method could improve the key rate by
about $10\%$.
