How does deflation by multigrid vectors affect the performance of the shifted Laplacian preconditioned for the Helmholtz equation? We investigate several deflation variants that differ in the choice of the coarse grid operator. A rigorous Fourier mode analysis for the one-dimensional problem with Dirichlet boundary conditions shows that the use of deflation results in tighter clustering of the spectrum at low wavenumber, and that undesirable small eigenvalues reappear at high wavenumber. Numerical results for two-dimensional problems show an iteration count that remains constant for low wavenumber and that increases linearly after a certain threshold value. This threshold value is larger in the deflation variant with the coarse grid operator that is more expensive to compute. Numerical results with the multilevel extension of the deflation algorithm on three-dimensional problems show significant speed-up.