Jeff Atwood wrote once he found quering database for primary keys, and then getting all relevant fields with an IN clause is double as quick as its single-sql counterpart.
I wonder if this applies to all situations, and if not, what are the cases when it still provides significant room for improvement in terms of performance?
Furthermore, how expensive is it to access db via a scripting language library? I'm mostly talking about the very famous PHP-MySQL combination.