You are here: Re: Launch storedquery for each record « MsSQL Server « IT news, forums, messages
Re: Launch storedquery for each record

Posted by Hugo Kornelis on 11/21/07 23:05

On Wed, 21 Nov 2007 22:22:57 +0000 (UTC), Erland Sommarskog wrote:

(snip)
>One battle I have to fight in my shop is with colleagues who think that a
>"poor man's cursor" is better. And maybe sometimes it is. But having a
>loop where you do SELECT MIN() on a non-indexed temp table with 100000
>rows is definitely not.

Hi Erland,

Maybe it is, but I doubt it. After investigating the effect of options,
I wouldn't be surprised to find a way to beat a cursor with the default
options, since they are SLOW - but I have yet to see a "poor man's
cursor" that outperforms a _properly optimized_ cursor.

If your colleagues ever show you a way that they think beats a cursor,
please share it with me. Might make neat blog fodder.

Hmmm, maybe I'll do a sequel to the cursor episode anyway. The
misunderstanding is common enough to warrant some attention on my blog.

--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis

 

Navigation:

[Reply to this 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

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