Scott Marlowe wrote:
The serial based approach sounds a fair bit better.
Er, I meant "sequence".
Yep, and if DB round trips are a problem it can always be wrapped up in a stored procedure. I'd be tempted to do that anyway just to simplify the client's job, guarantee query plan caching, etc.Add prepared select statements and you'd get get pretty fast performance.
-- Craig Ringer