waterWang opened a new pull request, #72085:
URL: https://github.com/apache/airflow/pull/72085

   When `USE_PSYCOPG3` is True, `_PostgresServerSideCursorDecorator.__next__`
   was using `fetchone()` which issues `FETCH FORWARD 1` per row, ignoring
   the configured `cursor_itersize`. This caused a 17x slowdown for large
   tables with server-side cursors.
   
   Fix by using `fetchmany(cursor.itersize)` to batch-fetch rows, matching
   the psycopg2 behavior which iterates the cursor (respecting itersize).
   
   Closes #72075


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to