Answer the question
In order to leave comments, you need to log in
What is the best way to read data from the database?
We write the transfer of data from one database to another. We use pyodbc.
There is a lot of data, tables are long. We decide with a colleague how best to read the data.
1. do a fetchall
2. cycle through the cursor
Which way to read is faster? more reliable? save on memory?
Answer the question
In order to leave comments, you need to log in
I think that in the first place it is worth optimizing a heavier record. Here bulk insert is a panacea.
By the way, I don’t exclude at all the crasy option of subtraction into a text file in the form of sql insert blocks and their subsequent execution through bulk
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question