Complicated measurement for machine tools geometric errors limits the high-accuracy machining processes. This research is aimed at measuring and identifying geometric errors of rotary axes efficiently by designing and optimizing measurement method using double ballbar. First, the conical and tangential measurement patterns are designed to reduce the installation times of the double ballbar. Secondly, the effect of installation errors is reduced by analyzing the coefficient matrix to avoid error accumulation. Thirdly, measurement trajectories affected by position-independent geometric errors are simulated and eliminated. Finally, the error measurement and validation experiments were performed on a dual-turntable five-axis machine tool, and the machining precision was improved by 34.09%-48.89%. The results indicated that the scheme can effectively identify the geometric errors of rotary axes and has the advantages of high efficiency and accuracy.