I just read this blog post and, in short, it say that if an SQL server isn't doing a good enough job building query plans, then the last thing you want to do is start hard coding stuff. So, that got me thinking; how could you "hard code" stuff without hard coding stuff. (Yes, that's the way I tend to think.)
Is the following; 1) possible, 2) a good idea and 3) are there any tools to help DBAs do it?
You have a slow query and for some reason you don't like the query plan your DBMS is choosing. So you start playing around with it (on the dev sever) by forcing different things until you get a plan that's better. Then you try and decompose the DBMS's decision process to find why it didn't choose that one and then reverse engineer what it will take to get it to choose the better one.
Edit: The first answers seem to be answering a slightly different question than I was trying to ask.
The situation: you have a query that's not fast enough but you think you can make it faster (at this point in time) by hard coding parts of the query plan. However you don't want to do that in prod for any number of reason.
The (proposed) solution: Build and test hard coded query plans. When you find one that's fast enough, try and back out what the DBMS is looking at (statistics etc.) when it chooses not to use the better plan. Once you have that, use that as a guide for what to tune.
The question: Is the above a practical way to go about the task? Are their enough knobs to turn to make it work? Are their any tools that show that data was used to make query plan decisions?