Let's say I need to issue a number of queries against a relational database, which of the following would be better from performance perspective:
Issue them one by one, being able to use data from the first ones as input in the secondary ones (meaning multiple connections made, but less joins/subselects).
Batch the commands together (meaning only one connection but more joins/subselects in the actual queries).
I'm hoping and thinking number 2 here, but would like it confirmed and maybe some arguments to back it up...
I'm using SQL Server 2008, but I guess this question should be generic for most db platforms(?).
EDIT: I'm aware of the fact that this is a very general question and as such I'm looking for general input/answers.