Server side or client side cursors? 
Author Message
 Server side or client side cursors?

Does anyone know when it is best to use server side queries and when it is
best to use client side queries?

We are building a system using VB6 accessing a SQL Server database.



Fri, 31 May 2002 03:00:00 GMT  
 Server side or client side cursors?
When accessing a SQL Server via VB 6 and ADO, it is almost always faster to
user Server Side stored procedures for data retrieval, update, and insert
operations.  SQL Server will create a compiled script which will not need to
be recompiled. Also, a query plan will be generated to optimize the call.
With client side queries, the SQL server must interpret them each time.  In
the worst case, the client side query is executed on the client, where all
of the required data must be passed to the client for filtering, sorting,
etc....

Regards,
Nick



Quote:
> Does anyone know when it is best to use server side queries and when it is
> best to use client side queries?

> We are building a system using VB6 accessing a SQL Server database.



Sun, 02 Jun 2002 03:00:00 GMT  
 Server side or client side cursors?
You're talking about the difference between a stored procedure and a query
built into the application.  Yes, stored procedures execute faster because they
are pre-compiled and have a query plan to follow, but this has nothing to do
with cursor location.  In SQL Server, all queries "execute" at the server.

Think of the cursor location more like where the recordset lives.  A recordset
with a server side cursor requires you maintain an open connection to the
server, or it will die.  A recordset with a client side cursor can have it's
ActiveConnection set to nothing and will live on until it's closed.  Both can
be created by a calling a stored procedure to extract the data.


Quote:

>When accessing a SQL Server via VB 6 and ADO, it is almost always faster to
>user Server Side stored procedures for data retrieval, update, and insert
>operations.  SQL Server will create a compiled script which will not need to
>be recompiled. Also, a query plan will be generated to optimize the call.
>With client side queries, the SQL server must interpret them each time.  In
>the worst case, the client side query is executed on the client, where all
>of the required data must be passed to the client for filtering, sorting,
>etc....

>Regards,
>Nick



>> Does anyone know when it is best to use server side queries and when it is
>> best to use client side queries?

>> We are building a system using VB6 accessing a SQL Server database.



Wed, 05 Jun 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ADO-Access2000: Server-side vs Client-side cursor

2. ?client-side vs server-side cursors

3. Client Side and Server Side Cursors

4. difference betwen Client-side and Server-side cursors?

5. attached Contact Item on server-side becomes attached Mail Item on client-side

6. How Can I Pass Data Between the Server Side and the Client Side VB/JScript

7. store server-side array in client side

8. Client-side Subroutine calling Server-Side Subroutine

9. pass server side vbscript to client side javascript

10. Client side VS server side

11. Client side scripting / server side scripting

12. Client Side and Server Side Scripts

 

 
Powered by phpBB® Forum Software