Ah, a trick question.
1. Ideally getting paid by the hour sounds best because then you never (well, seldom) feel like you are being taken advantage of. However, in my experience, the trade off is that this tends to make for the worst kind of relationship with the production company or director, since they always want you to hurry the heck up or they feel like you're taking them for a ride. Plus, some people tend to think you're their slave when working by the hour and get mad if you even take a pee break, and god forbid you take a smoke break.
2. Getting paid by the day can be better than hourly in terms of client/worker relationship. It takes a lot of the clock-watching out of the experience. When you put in a long day, the client feels like they're getting a bonus. Hopefully though, not everyday turn into a long one. This is also a lot easier to negotiate as most of the freelancers I know use "day rates" and most production companies expect to be billed this way. Also, while not every production company is good at budgeting and scheduling, it's a lot easier to schedule to the day than to the hour, so the expectation of how many days your going to put in tends to be more accurate.
3. For really big projects, I usually prefer to be paid a flat sum. Of course, the amount I ask for is usually based on a number of days, so I always have a clause in my contract/agreement that allows me to renegotiate if things go crazy. Odds are, if it's a project large enough to charge a flat sum, it is all I'll be working on during that time period, so I can usually say "the project won't go beyond this date". I usually do this for PM gigs or really big post jobs.
It also depends on the type of client. I do a lot of industrial work directly for companies. Most corporations seem to want to pay you hourly or flat sum. Where production companies usually expect to be charged day rates.
My general rules of thumb:
1. Hourly only for really small gigs (less than a week) or where I know the client isn't a clock-watching penny pincher with no idea how much work needs to be done (aka Big Corporation with Deep Pockets and a big budget).
2. For any kind of crew position on a shoot I almost always charge by the day. Same for post gigs that are relatively short term. If you're going to freelance in production, you should have day rates, people will expect them.
3. For things that will keep me employed on only one gig for months, flat rate with an escape clause.