Not long at all. I did mine in Pattaya and I know many people that got their visa there don't even have the money in the Bank. It is kind of a chicken and egg problem - you can't open a bank account with a tourist visa, and you need money in the bank to apply for a retirement visa. You can easily get your retirement visa well before your tourist visa runs out. Just call up a visa agent in Bangkok or Pattaya (which is cheaper, and easier but you will need take a trip there to renew every year.
Things change constantly, so once it is closer to your retirement age, just call up one or two visa agent to figure out. Should be easy if you pay agent but many people DIY also can.