This tip was submitted to the SearchWin2000.com tip exchange by member Gilbert Segal. Please let other users know how useful it is by rating it below.
Using SQL Server cursors can be slow. However there is a way to speed them up. If you don't need to use all of the columns in a table, consider putting in only the columns you need in the SELECT statement. Instead of using "SELECT * ," use "SELECT col1,col2,etc."
I put in 20 columns in a query instead of using "*" and having it use all 95 columns. The cursor ran six times faster.
This was first published in March 2005