Sunday, February 19, 2012

Client Side Cursor vs Sever Side Cursor?

I having a difficult time here trying to figure out what to do here.
I need a way to scroll through a recordset and display the results
with both forward and backward movement on a web page(PHP using
ADO/COM)..

I know that if I use a client side cursor all the records get shoved
to the client everytime that stored procedure is executed..if this
database grows big wont that be an issue?..

I know that I can set up a server side cursor that will only send the
record I need to the front end but..

Ive been reading around and a lot of people have been saying never to
use a server side cursor because of peformance issues.

So i guess im weighing network performance needs with the client side
cursor vs server performance with the server side cursor..I am really
confused..which one should I use?

-JimJim:

> I having a difficult time here trying to figure out what to do here.
> I need a way to scroll through a recordset and display the results
> with both forward and backward movement on a web page(PHP using
> ADO/COM)..

Not sure why you would need anything else other than a forward only
recordset on a website. Unless you are planning on persisting the recordset
for the session and then navigating back and forth thru it.

> I know that if I use a client side cursor all the records get shoved
> to the client everytime that stored procedure is executed..if this
> database grows big wont that be an issue?..

Please note that your "Client" in this case would be the web server and not
the actual end users browser.

> Ive been reading around and a lot of people have been saying never to
> use a server side cursor because of peformance issues.

Does your web server (IIS or Apache) reside on the same physical server as
the database?. I would think that the performance issues would come from the
network trip hit. But if the web server and database are on the same
physical server, then this wouldn't matter.

Personally, I don't like the idea of returning 1,000,000 records just to
display 20 at a time. Nor do I think you can keep a connection/recordset
alive in between web pages without severaly affecting scalability.

You may want to do a search on this newsgroup thru google groups for other
paging techniques that will return only the results the user needs.

HTH,

BZ

"Jim" <jim.ferris@.motorola.com> wrote in message
news:729757f9.0312181931.4e4bba84@.posting.google.c om...
> I having a difficult time here trying to figure out what to do here.
> I need a way to scroll through a recordset and display the results
> with both forward and backward movement on a web page(PHP using
> ADO/COM)..
> I know that if I use a client side cursor all the records get shoved
> to the client everytime that stored procedure is executed..if this
> database grows big wont that be an issue?..
> I know that I can set up a server side cursor that will only send the
> record I need to the front end but..
> Ive been reading around and a lot of people have been saying never to
> use a server side cursor because of peformance issues.
> So i guess im weighing network performance needs with the client side
> cursor vs server performance with the server side cursor..I am really
> confused..which one should I use?
> -Jim

No comments:

Post a Comment