I am currently using python with adodb api for MS Sql database connection. This is working very well for smaller databases. But for large databases when the query is returning huge data, I get MS Sql cursor out of memory error. This works fine with Server side cursor. But then it consumes lot of memory on my server.

Question 1: How can I continue to use client side cursor? Can reading data in chunks be an option?

Question 2: Is there any alternative to python ado db API?

I searched for other options to connect to MS Sql. Found this link about comparison - pymssql versus pyodbc versus adodbapi versus.... This looks old information. I have started my own investigation with pyodbc and pymssql.

Can anybody recommend which is better out of these?

1

There are 1 answers

0
sam On BEST ANSWER

As suggested by Gord, I tested my code with pyodbc and its working 3 times faster than adodb api.