0

I am trying to fetch data from Postgresql using python. I used fetchall function but since the data is huge its not working and taking lot of time so i thought chunksize might help but unable to find any document on it.

  • What Postgresql adapter are you using and what have you done so far? Please provide more information – kyore Jul 27 '22 at 05:17
  • i am using psycopg2 connector. I have created the connection and created the cursor and by using cur.execute i am sending my SQL to database and using fetchall to get all the data into python memory. – Tushar Lohit Jul 27 '22 at 05:31
  • Please check https://stackoverflow.com/questions/17933344/python-postgres-can-i-fetchall-1-million-rows – canpoint Jul 27 '22 at 07:07
  • There is no chucksize, so no documentation for it. Pandas has a chunksize. psycopg2 has itersize. Both are documented in their respective documentation. – jjanes Jul 27 '22 at 13:29

0 Answers0