@Profiler.profile
def test_core_fetchmany_w_streaming(n):
 with engine.connect() as conn:
  result = conn.execution_options(stream_results=True).execute(Customer.__table__.select().limit(n))
  while True:
   chunk = result.fetchmany(10000)
   if (not chunk):
    break
   for row in chunk:
    data = (row['id'], row['name'], row['description'])

@ Profiler . profile def test_core_fetchmany_w_streaming ( n ) : with engine . connect ( ) as conn : result = conn . execution_options ( stream_results = True ) . execute ( Customer . __table__ . select ( ) . limit ( n ) ) while True : chunk = result . fetchmany ( 10000 ) if ( not chunk ) : break for row in chunk : data = ( row [ 'id' ] , row [ 'name' ] , row [ 'description' ] )
load core result rows using fetchmany/streaming .