ADO and Cursors with MSSQL

From: Schlup Herbert (hschlup_at_external.ch.nospam)
Date: 03/23/04


Date: 23 Mar 2004 13:02:30 -0800


Hi All

I have a programm that uses ADOConnection with MSSQL. I like to insert about 100'000 records. No I saw, that when I use parameters with my Insert-Statement, the memory used by MSSQL is not so heavy increasing as when i use a specific Insert-SQL Statement for each row.

I think this is because ADO creates a cursor for each insert. Now, in several cases I have to use this 2nd possibility. So how can I free the cursors so that the SQL-Server can free the memory?

The problem is that the server is taking memory, and he never free's it.

Herbert



Relevant Pages

  • Re: Old Mac Mini - what system to upgrade to?
    ... If there is a cursor, ... Maybe 3.5" disks required less spin-up current when the enclosure was designed, or maybe the enclosure engineers found that limiting spin-up current would extend the life of a disk. ... I have found that with Safari running, I may have only a sliver of free memory. ... CNodeRegister:RegisterLocalNetInfoHierarchy::Call to netinfo_domainname for local domain name lasted 10 seconds. ...
    (comp.sys.mac.system)
  • Re: Huge memory comsumption of ADODB Connection object
    ... unless the cursor is returning data to the client* I don't see ... I suppose this could cause some extra memory ... Is there a similar behavior in Sybase? ... Server was originally based on that rdbms, so there very well may be. ...
    (microsoft.public.data.ado)
  • Re: Huge memory comsumption of ADODB Connection object
    ... that's why I use cursor to get each row. ... comsume so much memory ... , or SYBASE. ... ADODB Connection comsumes huge ...
    (microsoft.public.data.ado)
  • Re: Huge memory comsumption of ADODB Connection object
    ... It's a equipment management system, in which there are some equipment in ... (not using cursor to do this). ... ADODB Connection comsumes huge ... memory before it is closed. ...
    (microsoft.public.data.ado)
  • Re: how not to run out of memory in cursor.execute
    ... and I find that the cursor.execute method uses a lot of memory that ... help, since execute doesn't give its memory back, after reading enough ... memory back from execute in cx_Oracle and MySQLdb? ... cursor iteration idiom: ...
    (comp.lang.python)