SQL Server - ways to avoid using cursors - Feb 27, 2010 at
11:50 AM by Shuchi Gauri
What are ways that can be used to avoid using cursors in my applications?
Ways to avoid cursors:
-
Write SQL Statements instead of cursors if action applied to rows is same.
-
Rewrite cursors as a derived query.
-
Use temporary tables instead of cursors
-
Cursors have poor performance, thus, rewrite them as complex SQL Statements.
SQL Server - ways to avoid using cursors - May 05, 2009 at
22:00 PM by Rajmeet Ghai
What are ways that can be used to avoid using cursors in my applications?
-
The cursor can be written as a normal query in case of scenarios when the task
needs to be performed repeatedly.
-
The cursor can be re written as a derived query.
-
The cursor can be re written as using temporary or table variables in a query.
SQL Server - ways to avoid using cursors - June 21, 2009 at
09:00 AM by Amit Satpute
-
Rewrite the cursor as a normal query. A standard query wouldn’t waste server
resources.
-
The cursor can be rewritten as a derived query.
-
The cursor should be rewritten using temporary tables in a query.
-
The cursor should be rewritten using table variables in a query.
Also read
Answer - Cursors can support various functionalities that are
listed here.....
Answer - Cursors behavior can be controlled by dividing them
into cursor types: forward-only, static,........
Answer -
Stored procedures provide performance benefits through local storage,
precompiling the code, and caching......
|