From an essay by L. Ron Hubbard called "The Manuscript Factory":
It is so easy to get good raw materials that most writers consider it quite unnecessary.
Hence the errors which make your yarn unsalable. You wouldn’t try to write an article on steel without at least opening an encyclopedia, and yet I’ll wager that a fiction story which had steel in it would never occasion the writer a bit of worry or thought.
You must have raw material. It gives you the edge on the field. And no one tries to get it by honest research. For a few stories, you may have looked far, but for most of your yarns, you took your imagination for the textbook.
After all, you wouldn’t try to make soap when you had no oil.
The fact that you write is a passport everywhere. You’ll find very few gentlemen refusing to accommodate your curiosity. Men in every and any line are anxious to give a writer all the data he can use because, they reason, their line will therefore be truly represented. You’re apt to find more enmity in not examining the facts.
Raw materials are more essential than fancy writing. Know your subject.
The article starts here. The right margins seem to be on vacation; I had to highlight the text in order to read it. Let me know if there's more reader-friendly version of this somewhere!
No one finds me more surprised to be linking to L. Ron Hubbard than myself, believe me. But this essay was mentioned in a recent post by David Farland that I enjoyed, so I hunted it down, and thought it was still relevant and interesting.
Particularly this above. On the one hand, too much research can kill the writing before you've even written a word. But on the other... I could take a class on sword fighting, or interview a medievalist, or visit a musuem—there are any number of ways for me to get a better grasp on my epic swords and sorcery saga that one day you'll hear about but, for now, is still in the wishful thinking stage. And mostly I do not even consider them.
What kind of research do you do before/during/after your writing?