Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Loop through a result set
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
01116848
Message ID:
01116922
Vues:
15
>If it's that few a number, then a cursor is OK. Using the READ_ONLY and FORWARD_ONLY keywords reduces the overhead of cursors (assuming you don't need to modify them, and that you'll only move forwards in them)
>
>In some/many instances, you can avoid cursors by using derived tables or correlated subqueries. And in SQL2005 there are new capabilities for recursive queries. But a cursor should work fine if it's that small.

Yes the cursor seems to be pretty quick, but then again I have only tested on a local server with relatively low number of total records. This SP will not be used that frequently so I am not that concerned.
Do you know if READ_ONLY and FORWARD_ONLY are default? I don't think I added those keywords.

Thanks for the warnings and hints.

Are you a big jazz fan? (your signature)
Semper ubi sub ubi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform