What is the best alternative to using a cursor in sql server,considering the performance impacts of using a cursor?
-
-
Answer:
It really depends on the query, but the key is to find a set-based solution instead of using the row-by-row processing of a cursor. Another alternative if you can't discern a single set-based query is to use temporary tables and break the process up that way. But that really is a second choice. Without a particular query to address, it's hard to say anything substantive beyond this general advice.
Grant Fritchey at Quora Visit the source
Related Q & A:
- What is the best practice for free space for a SQL server database drive?Best solution by Database Administrators
- How to add primary key from multiple table as a foreign key in a table in sql server 2008?Best solution by stackoverflow.com
- What's the best way to get a job in a restaurant?Best solution by Yahoo! Answers
- What's the best way to make a good impression at a job interview?Best solution by Yahoo! Answers
- What are the best ways to find a job with a social entrepreneurial company?Best solution by answers.yahoo.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.