PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.server > SQL Server 2005 - Performance - Writing stored procedure in C# .Ne
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
SQL Server 2005 - Performance - Writing stored procedure in C# .Ne

Réponse
 
LinkBack Outils de la discussion
Vieux 16/07/2008, 10h56   #1
AtulSureka
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut SQL Server 2005 - Performance - Writing stored procedure in C# .Ne

I have a stored procedure which is having multiple cursors. These cursors are
affecting the performance of SP.

With SQL Server 2005 we can write the SP in C#. If I replace those cursors
with for/while loop of C# code then will there be any performance benefit
with it?

Can anybody tell me what internally happens when we write code in C#? How it
process the C# code?

Atul Sureka
  Réponse avec citation
Vieux 16/07/2008, 11h33   #2
Uri Dimant
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SQL Server 2005 - Performance - Writing stored procedure in C# .Ne

Hi
> With SQL Server 2005 we can write the SP in C#. If I replace those cursors
> with for/while loop of C# code then will there be any performance benefit
> with it?


Have you tried it?

> Can anybody tell me what internally happens when we write code in C#? How
> it
> process the C# code?


It is SQL Server forum, you will better of to ask in C# newsgroup



"AtulSureka" <atul@mimosasystems.com> wrote in message
news:C422A088-960C-4CF1-9CF6-160CD3D8DFF0@microsoft.com...
>I have a stored procedure which is having multiple cursors. These cursors
>are
> affecting the performance of SP.
>
> With SQL Server 2005 we can write the SP in C#. If I replace those cursors
> with for/while loop of C# code then will there be any performance benefit
> with it?
>
> Can anybody tell me what internally happens when we write code in C#? How
> it
> process the C# code?
>
> Atul Sureka



  Réponse avec citation
Vieux 20/07/2008, 14h38   #3
Gert-Jan Strik
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SQL Server 2005 - Performance - Writing stored procedure in C# .Ne

AtulSureka wrote:
>
> I have a stored procedure which is having multiple cursors. These cursors are
> affecting the performance of SP.
>
> With SQL Server 2005 we can write the SP in C#. If I replace those cursors
> with for/while loop of C# code then will there be any performance benefit
> with it?
>
> Can anybody tell me what internally happens when we write code in C#? How it
> process the C# code?
>
> Atul Sureka


Atul,

I don't have the answers to your questions. However, if multiple cursors
give you unsatisfactory performance, then I would suggest you eliminate
some or all of the cursors, and replace them with a set based solution.
Set based solutions are typically orders of magnitude faster than
equivalent cursor approaches.

If there is performance benefit in rewriting the T-SQL code in C#, I
would expect the difference to be marginal (at least in comparison with
a set based approach).

--
Gert-Jan
SQL Server MVP
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 06h01.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09382 seconds with 11 queries