Migrating cells exhibit various motility patterns, resulting from different migration mechanisms, cell properties, or cell-environment interactions. The complexity of cell dynamics is reflected, e.g., in the diversity of the observed forms of velocity autocorrelation function -- that has been widely served as a measure of diffusivity and spreading -- . By analyzing the dynamics of migrating dendritic cells in vitro, we disentangle the contributions of direction and speed to the velocity autocorrelation. We find that the ability of cells to maintain their speed or direction of motion is unequal, reflected in power-law decays of speed and direction autocorrelation functions with different exponents. The larger power-law exponent of the speed autocorrelation function indicates that the cells lose their speed memory considerably faster than the direction memory. Using numerical simulations, we investigate the influence of speed and direction memories as well as the direction-speed cross-correlation on the search time of a persistent random walker to find a randomly located target in confinement. Although the direction memory and direction-speed coupling play the major roles, we find that the speed autocorrelation can be also tuned to minimize the search time. Adopting an optimal speed memory can reduce the search time even up to 10% compared to uncorrelated spontaneous speeds. Our results suggest that migrating cells can improve their search efficiency, especially in crowded environments, through the directional or speed persistence or the speed-direction correlation.