Summary
Your application's performance is not constrained by your code and database choices. There are limitations that you must be aware of in order to choose the best path for your application. These are just external elements of your application that influence its performance, but there are others as well.
The most important rule—you shouldn't forget it—is to plan your steps. Don't develop without thinking properly about this. A bad choice will make your life harder later on when you have to fix it. It's better to lose an hour thinking than a week fixing. That's actually part of your own development performance.