  We study local and global optimality of geodesics in the left invariant
sub-Riemannian problem on the Lie group $\mathrm{SH}(2)$. We obtain the
complete description of the Maxwell points corresponding to the discrete
symmetries of the vertical subsystem of the Hamiltonian system. An effective
upper bound on the cut time is obtained in terms of the first Maxwell times. We
study the local optimality of extremal trajectories and prove the lower and
upper bounds on the first conjugate times. We also obtain the generic time
interval for the $n$-th conjugate time which is important in the study of
sub-Riemannian wavefront. Based on our results of $n$-th conjugate time and
$n$-th Maxwell time, we prove a generalization of Rolle's theorem that between
any two consecutive Maxwell points, there is exactly one conjugate point along
any geodesic.
