I've been at my current job 2 years. Things have slowed down a lot in Alberta, so new offers and opportunities are very hard to find. But I've made myself useful to a handful of companies, and don't anticipate any shortages in work (during a period when many are getting laid off and taking paycuts). When things pick back up, I've got a verbal offer on a position which should bring me another hefty raise.
My advice: Switch whenever an opportunity comes up that offers better work or pay. Employers are generally reluctant to hand out a 10-20% raise, but they will easily pay that money to someone new coming in to fill a hole in their organization. It can be difficult to explain coming-and-going in interviews, but if you have a solid line of references and some okay answers, their need to hire is often stronger than their desire to see what's wrong with you.
As someone who has job-hopped a lot in this environment, the worst thing about it is tech environments where the leadership doesn't keep up with trends even on an awareness level. They just stick with the legacy stack they've been supporting for years, which can be incredibly wasteful and limiting. Their software is bad, but it's all they've known for so long that they have no clue how much better things can be. And then the contractors and other floaters they bring through are appalled, frustrated, and often flip quickly to the next job in hopes of less "maturity". Sigh.
Last fall, I was in Silicon Valley at an enterprise meetup, and was talking to people there about a sense of scale. I observed that if you saw a startup generating $50M in revenue, you'd think they were very successful. I've worked on three different projects larger than that (some private, some government), and they were just side businesses to bigger enterprises.
As another responder said, the Twin Cities is very tech centric. While there are quite a few enterprise jobs, there are plenty of opportunities across the corporate-size spectrum--from startups (a large startup community exists there) to global Fortune 50 companies.
It truly is analogous to Silicon Valley.