Re: client side cursor vs server side cursor regarding memory used



> For example, I think that since
> the client side cursor keeps track of the cursor on the client side, it'd
> retain all the records retrieved so far whereas the server side cursor
might
> not.

Client-sided is expensive in terms of memory for the application.
It has to build up the entire Recordset in client-sided memory.
It helps if you economise in terms of LockType.
For example, if you are only going to read from the Recordset, use
adLockReadOnly.
There is only one CursorType : adOpenStatic

Server-sided is cheap in terms of memory for the application as the server
takes the strain.
Memory consumed is whatever the CacheSize is + some overhead for CursorType
and LockType.
adLockReadOnly is the cheapest LockType
adOpenForwardOnly is the cheapest CursorType (but very limited in what
functionality it give you - no MovePrevious, no RecordCount).
In general - don't use a more expensive cursor than you need - it will
consume more resources to setup and maintain.

Stephen Howe


.



Relevant Pages

  • Re: Huge memory comsumption of ADODB Connection object
    ... Why I said the Connection ... to nothing, the memory used by my app doesn't decrease, only when I close the ... I take the same opinion as you do, if the cursor doesn't return ... resultset to client, no impact will be imposed to client. ...
    (microsoft.public.data.ado)
  • Re: cancel ADO2.8 asynchron queries over WAN, takes long time
    ... > the .open method first creates the recordset at the server. ... I use clientside cursor to minimalize the traffic... ... client because they generate all sorts of activity between client and ...
    (microsoft.public.data.ado)
  • Re: cancel ADO2.8 asynchron queries over WAN, takes long time
    ... > the .open method first creates the recordset at the server. ... I use clientside cursor to minimalize the traffic... ... client because they generate all sorts of activity between client and ...
    (microsoft.public.sqlserver.programming)
  • Re: cancel ADO2.8 asynchron queries over WAN, takes long time
    ... > the .open method first creates the recordset at the server. ... I use clientside cursor to minimalize the traffic... ... client because they generate all sorts of activity between client and ...
    (microsoft.public.vb.database.ado)
  • Re: Closed recordset on Integrated Security?
    ... > There are several client VB6.EXE's that use this ActiveX EXE to connect to ... > either a recordset or a variable array of the recordset ... > Using the same scenario, using SQL server logons, the recordset is NOT ... > ONLY arises when a cursor is in the stored procedure. ...
    (microsoft.public.vb.database.ado)