We investigate potential gains in cosmological constraints from the combination of galaxy clustering and galaxy-galaxy lensing by optimizing the lens galaxy sample selection using information from Dark Energy Survey (DES) Year 3 data and assuming the DES Year 1 metacalibration sample for the sources. We explore easily reproducible selections based on magnitude cuts in i-band as a function of (photometric) redshift, zphot, and benchmark the potential gains against those using the well-established redMaGiC [E. Rozo et al., Mon. Not. R. Astron. Soc. 461, 1431 (2016)] sample. We focus on the balance between density and photometric redshift accuracy, while marginalizing over a realistic set of cosmological and systematic parameters. Our optimal selection, the MagLim sample, satisfies i < 4zphot + 18 and has ∼30% wider redshift distributions but ∼3.5 times more galaxies than redMaGiC. Assuming a wCDM model (i.e. with a free parameter for the dark energy equation of state) and equivalent scale cuts to mitigate nonlinear effects, this leads to 40% increase in the figure of merit for the pair combinations of Ωm, w, and σ8, and gains of 16% in σ8, 10% in Ωm, and 12% in w. Similarly, in ΛCDM, we find an improvement of 19% and 27% on σ8 and Ωm, respectively. We also explore flux-limited samples with a flat magnitude cut finding that the optimal selection, i < 22.2, has ∼7 times more galaxies and ∼20% wider redshift distributions compared to MagLim, but slightly worse constraints. We show that our results are robust with respect to the assumed galaxy bias and photometric redshift uncertainties with only moderate further gains from increased number of tomographic bins or the inclusion of bin cross-correlations, except in the case of the flux-limited sample, for which these gains are more significant.