Using a relatively wide range cassete helps with that. Like someone else said above, you want some overlap in the gearing ranges of the two chainrings.
If I could get up all the climbs I want to climb on a 34x23 I'd use a 36 small ring and a 1x-25 cassette. That way I could use the 23t next to largest cog with the big ring so I can stay in the big ring longer. As it is I run a 50/34 and 12-27... there's some long steep climbs here.