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



>I believe I am using adLockReadOnly but the main issue is probably the fact
> that I am using the client side cursor with 60K+ rows if what you are
> stating is true.

It is true. When you do RecordSet Open(), it won't normally complete until
the last record is read (unless you use asynchronous Open()). You can watch,
using Task Manager the amount of memory being consumed going up on a steady
ramp. Given the size of the request, eventually Windows will start paging
out to disk.

> I will try server side cursor with my text source and see if that
> alleviates
> the memory problem.
> Thanks!

Open() now returns once CacheSize records (or less) are read. You might want
to set the CacheSize to something like 64, 256 etc rather than the default 1
before doing the Open(). It gives better performance. There is no optimal
number. My hunch (unchecked) is that the optimal size is something like
Network Packet Size / Record Size. With 256 records, the cache is filled
with 256 records and it won't request more from the Server until 256
MoveNext()'s have been done.

Stephen Howe


.



Relevant Pages

  • Re: VB connection to SQL server
    ... > the client machine begins to lose its relevance and accuracy as soon as it ... > aware that the data is probably out of date, a client sided cursor might ... > design minimises the possibility that records will have changed in the ... >> The Database server is in the office, and people use the Vb program from ...
    (microsoft.public.vb.database)
  • 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: VB connection to SQL server
    ... "Chris Barber" wrote in message ... > recordsets (client side cursor) to allow you to persist the recordsets to ... aware that the data is probably out of date, a client sided cursor might fit ... That is because the SELECT statement is executed on the server and the data ...
    (microsoft.public.vb.database)
  • Re: Accessing A Large MS SQL Table Over ADO Components
    ... Client-side cursor fetches all rows, ... Because I had some performance loss when I set it up to Server ... Server-side cursor does not fetch all rows to client, so if server is on the ... > If we want to display the data on a readonly grid wich component is the ...
    (borland.public.delphi.database.ado)
  • Re: ADO server side cursor sloooow
    ... Using the ODBC driver my tests show that both client and server side ... forward only server side cursor is faster than a client side cursor as ... requiring over 1000 trips over the network. ...
    (comp.databases.btrieve)