When you attempt to use MultiCriteria or MultiQuery against the
OracleDataClientDriver, you get the exception message "The driver {0}
does not support multiple queries."  This seems like a wasted
opportunity.

If you attempt to override the SupportsMultipleQueries driver
property, NH will spit out a number of queries like this:
"
select count(*) from a;
select count(*) from b;
"

Oracle doesn't like this syntax.  You can however open a reference
cursor for each result set, like this:
begin
  open :1 for select count(*) from a;
  open :2 for select count(*) from b;
end;

In this example, you must pass in two output parameters which are of
type OracleDbType.RefCursor.  The returned value is an
OracleRefCursor, which has a GetDataReader() operation.  Going down
this road seems to be three to four times slower than using individual
commands, even for 100 queries.  I'm surprised it's that bad, but I
wouldn't expect it to be much quicker as you're still round-tripping
for each result set.

Does anyone know of a way to have Oracle return a set of results
immediately?  Or am I barking up the wrong tree entirely?

Thanks

Reply via email to