Stored Procedure call overhead-way to batch?

Consider nesting that stored procedure inside a new stored procedure that accepts array parameters. It would call the original SP for each, and assemble the result from each into a row of a response dataset. One call to process many operations.

You'll need a competent database (with UNNEST or equivalent support):

1 Like