From: Galen Boyer on
Thomas Gagne <TandGandGAGNE(a)gmail.com> writes:

> John Hurley wrote:
>> <snip>
>>
>> Multiple sql statements in a batch? Why would you want to do that in
>> oracle?
>>
> Performance. Do as much with a single trip to the database as
> possible to avoid going back and forth between client and server.
> Reduces network traffic.

I would test this theory. In your OP, you said you were sending
multiple select statements. I'd prove out that you are actually saving
anything when you send multiple statements at once. Each statement
would be returning a resultset. Where is the savings on the way out?

Then, once you see you aren't saving anytime, you can then have your
client program execute a SQL statement exactly when it needs to.

--
Galen Boyer

--- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
From: Galen Boyer on
Thomas Gagne <TandGandGAGNE(a)gmail.com> writes:

> Galen Boyer wrote:
>
> <snip>
>
> I would test this theory. In your OP, you said you were sending
> multiple select statements. I'd prove out that you are actually saving
> anything when you send multiple statements at once. Each statement
> would be returning a resultset. Where is the savings on the way out?
>
>
> I've already done that and the savings are dramatic.

What savings? I don't see how you can save hardly anything by sending 3
sql statements together to the database and returning 3 result sets, vs
sending 1 sql statement and recieving 1 result set 3 times in a row.

Can you give a simple "select fld from t1" example and show these numbers?

> Listen, if Oracle can't do it that's OK. I'll figure out how best to do it
> with what Oracle does provide and move on to the next problem.

Oracle can do this. An anonymous block of code with each sql statement
would suffice.

--
Galen Boyer

--- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
 | 
Pages: 1
Prev: _MAX_TRANSACTION_COUNT
Next: Select As question