You are here: Re: query performance help needed « MsSQL Server « IT news, forums, messages
Re: query performance help needed

Posted by Inna on 11/18/07 21:01

>
> All and all, there is no reason why P_main should be slow on its own.
> It reads some fairly small system tables, and runs a cursor over 30 rows.
>
> You say that the various P_ALL_DB runs quickly when they run on their
> own, but there is one difference when you run it from P_Main: the
> procedure will run in the context of a transaction defined by the
> INSERT statement. I'm not really sure how that could matter, but then
> again, I don't know what is in those P_ALL_DB. But there could be blocking
> issues.
>
> One way to test this is to remove the INSERT, and run P_main and see
> how that affects the execution time.
>

>
> Pinning tables is very rarely if ever a good idea, and this feature
> has been nullified in SQL 2005.
>
> --
> Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se
>
Hello,
I removed the INSERT into temp table and it does runs faster and
actually by a lot. But I need a record set to be returned in one set,
how can I achieve without using temp table.

Thank you very much.

 

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

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