p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_components thread: client side and server side cursors


Message #1 by "Gaurav Bansal" <buddy_gg@h...> on Thu, 19 Dec 2002 18:50:49 +0530
Hi all
can any one tell me what type of cursor is fast. client side cursor or server side. i am using ADO. 
I have a server computer and 30 client computers. Query fatches about 4000 records at a time. typically what type of cursor i should
use in this case.

thanks 

Gaurav Bansal

Message #2 by "Adrian Forbes" <adrian.forbes@n...> on Thu, 19 Dec 2002 13:31:33 -0000
> can any one tell me what type of cursor is fast

It depends :)

> Query fatches about 4000 records at a time. typically what type
> of cursor i should use in this case.

Why don't you try both and time them to see which is faster?  When you
select 4000 records with a client cursor then the client has to wait for all
4000 to be given to it.  This means that the initial query is slower, but
running through the data is faster.

With a server cursor the client gets the data in chunks so the initial query
is fast (as it only gets a handful of results) but running through the data
is slower as it has to keen getting the next batch of results from the
server.

Server cursors also put more stress on the database engine and the network,
but if you are not planning on running through all of the rows they are
better.  If you do plan on running through all rows then a client cursor
might be for you.


Message #3 by "Johnson, Israel" <IJohnson@R...> on Thu, 19 Dec 2002 08:32:15 -0500
I would think the server-side would be faster because it takes the work from
the client.  Client-side cursors performance would vary across the client.
I would let the server do all the work, especially if you are using SQL
Server as your DBMS....  


HTH

-----Original Message-----
From: Gaurav Bansal [mailto:buddy_gg@h...] 
Sent: Thursday, December 19, 2002 8:21 AM
To: ASP components
Subject: [asp_components] client side and server side cursors

Hi all
can any one tell me what type of cursor is fast. client side cursor or
server side. i am using ADO. 
I have a server computer and 30 client computers. Query fatches about 4000
records at a time. typically what type of cursor i should use in this case.

thanks 

Gaurav Bansal


 
%%email.unsub%%


  Return to Index