Reply to Re: what are cursors in sql???

Your name:

Reply:


Posted by David Portas on 02/27/06 14:19

Doug wrote:
> interesting take on cursors.
> I have never used cursors in client code. seemed pretty inefficient to
> pass all that crud across the net, and leave the cursor open until the
> clients cpu can process it.
>

That's true. Usually most processing should happen at the server. I
didn't mean to imply otherwise. A client recordset is a cursor of sorts
and that's what I was referring to.

> i've used cursors extensively in stored procedures.
>

Really? For most production tasks I'd say that more than 99% of data
manipulation can best be done without a cursor. Certainly if you make
"extensive" use of cursors then I'd suggest you should be looking
harder for better solutions. That's unless you are writing lots of
metadata management or admin processes. For example I think I've
written maybe 3 or 4 cursors in the last 6 years and all were for
DBA-type tasks.

--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация