Re: Server side cursors and locking

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



> Does anyone have any suggestions? Obviously I could switch to a
client-side
> cursor or disconnected recordset, but if the result set grows large it
might
> overwhelm the app. Does anyone have any thoughts on how to deal with this
> situation?

Set the CacheSize.
For a client-sided cursor the CacheSize is unimportant as all data is
locally held.
For a server-sided cursor the CacheSize is very important. Setting this
involves fewer round trips to the database. The default is 1. I tend to use
powers-of-2. So 64,128, 256, 512 seem good.
I suspect that the optimal size is something like
NetworkPacketSize/RecordSizeOfQueryInQuestion

Also, use the cheapest cursor, locktype you can.
You don't say whether the recordset is updated. If not, use adLockReadOnly.
And if you do not need to do MovePrevious, use adForwardOnly.

Stephen Howe


.



Relevant Pages