Confusing wording on yield_per

Issue #2616 resolved
Former user created an issue

The docs seem to say that psycopg2 doesn't stream results with yield_per, isn't that the opposite?

Comments (5)

  1. Mike Bayer repo owner

    the situation is: mysqldb and psycopg2 do not stream results by default - they buffer them. psycopg2 offers an option called "server side cursors", which when used, causes psycopg2 to not buffer results. the "stream_results" execution option is a SQLAlchemy option which establishes this status on the psycopg2 cursor, and is implicit when yield_per() is used.

    OK with those facts, let me know that you understand them, then please suggest a wording that you feel is more clear. thanks !

  2. Former user Account Deleted

    Ah, now I understand.

    Also note that while yield_per() will set the stream_results execution option to True, currently this is only understood by psycopg2, which will stream results using server side cursors. Other DBAPIs (XX any exceptions to mention here?) do not “stream” results at all, pre-buffering all rows before making them available. (or: No DBAPI is known to stream results by default, instead pre-buffering etc).

  3. Log in to comment