Tahir Butt wrote:
> A final comment on this issue.
>
> oracle.jdbc.driver.OracleDriver is considerably faster than zxjdbc in
> my case where I'm reading many rows.
>
> On Mar 9, 1:51 pm, Tahir Butt <tahir.b...@gmail.com> wrote:
>> Sorry the zxjdbc test should read:
>>
>> cursor = db.cursor(1)
>> cursor.execute(query)
>> for r in cursor:
>>     pass

so, two (OK three) points here.  One is that cx_oracle also "streams"
results, and there are some caveats there we would likely need to apply,
and another is that according to Philip Jenvey the zxjdbc cursor also
loses some functionality in "dynamic" mode, i.e. that it is only
appropriate for a select.

So assuming the caveats of #1 apply, which is namely that LOB objects
aren't fetched in "dynamic" mode until requested, the execution context
would need to use the BufferedColumnResultProxy so that they are present
in the case that fetchmany() or fetchall() is called.

If the caveats in #2 apply, I would favor going with the approach that the
psycopg2 dialect takes, and that is that you use the "stream_results"
execution option if you'd like "streamed" results.  In fact I sort of
favor doing the "stream_results" option regardless for any non-default
cursor behavior.  it makes the implementation way simpler.

third point, AFAIK zxjdbc is making usage of oracle.jdbc.OracleDriver. 
Though i see its hardcoding the "thin" aspect of it.  the base zxJDBC
connector should accept different driver names as arguments (is that what
you're looking for ?)

>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To post to this group, send email to sqlalch...@googlegroups.com.
> To unsubscribe from this group, send email to
> sqlalchemy+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sqlalchemy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to