0

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?

Community
  • 1
  • 1
sam
  • 11
  • 1
  • 5
  • Of the three connection options you mentioned, pyodbc is the one that is [officially supported by Microsoft](https://blogs.technet.microsoft.com/dataplatforminsider/2016/12/09/sql-server-python-whats-new/). – Gord Thompson Jan 01 '17 at 22:29
  • Thanks Gord for information! – sam Jan 02 '17 at 05:35

1 Answers1

0

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

sam
  • 11
  • 1
  • 5