Tag: cursor

Pro Members SQL Server Standard Members

Some tips for using SQL Server 2019 cursors

Some tips for using SQL Server 2019 cursors Try to avoid using SQL Server cursors, whenever possible. SQL Server cursors can results in some performance degradation in comparison with select statements. Try to use correlated subquery or derived tables, if you need to perform row-by-row operations. Use READ ONLY cursors, whenever possible, instead of updatable cursors. Because using cursors can…...

This content is for Pro, Pro Member, Pro Member Annual - Fall Sale, Pro Member Monthly - Fall Sale, Standard, Standard Member, Standard Member Annual - Fall Sale, and Standard Member Monthly - Fall Sale members only.
Log In Register
Pro Members SQL Server Standard Members

Tips for using SQL Server 2017 cursors

Tips for using SQL Server 2017 cursors Use READ ONLY cursors, whenever possible, instead of updatable cursors. Because using cursors can reduce concurrency and lead to unnecessary locking, try to use READ ONLY cursors, if you do not need to update cursor result set. Try to avoid using SQL Server cursors, whenever possible. SQL Server cursors can results in some…...

This content is for Pro, Pro Member, Pro Member Annual - Fall Sale, Pro Member Monthly - Fall Sale, Standard, Standard Member, Standard Member Annual - Fall Sale, and Standard Member Monthly - Fall Sale members only.
Log In Register
Pro Members SQL Server Standard Members

Troubleshooting problems with locking in SQL Server 2016

Troubleshooting problems with locking in SQL Server 2016 If you have problems with SQL Server 2016 locking, review this troubleshooting checklist to find potential solutions. 1. Install the latest SQL Server 2016 service pack. Because many locking bugs were fixed in SQL Server 2016 service packs, you should install the latest SQL Server service pack. At the time this article…...

This content is for Pro, Pro Member, Pro Member Annual - Fall Sale, Pro Member Monthly - Fall Sale, Standard, Standard Member, Standard Member Annual - Fall Sale, and Standard Member Monthly - Fall Sale members only.
Log In Register
SQL Server

Tips for using SQL Server 2016 cursors

Tips for using SQL Server 2016 cursors Reduce the number of rows to process in the cursor. To reduce the cursor result set use the WHERE clause in the cursor’s select statement. Do not forget to close SQL Server 2016 cursor when its result set is not needed. To close SQL Server cursor, you can use CLOSE {cursor_name} command. This […]

Pro Members SQL Server Standard Members

Tips for using SQL Server 2014 cursors

Tips for using SQL Server 2014 cursors Try to avoid using insensitive, static and keyset cursors, whenever possible. These types of cursor produce the largest amount of overhead on SQL Server 2014, because they cause a temporary table to be created in TEMPDB, which results in some performance degradation. Use FAST_FORWARD cursors, whenever possible. The FAST_FORWARD cursors produce the least…...

This content is for Pro, Pro Member, Pro Member Annual - Fall Sale, Pro Member Monthly - Fall Sale, Standard, Standard Member, Standard Member Annual - Fall Sale, and Standard Member Monthly - Fall Sale members only.
Log In Register
Pro Members SQL Server Standard Members

SQL Server 2012 Temporary Tables Optimization Tips

SQL Server 2012 Temporary Tables Optimization Tips Use local temporary tables instead of SQL Server 2012 cursors. Because using temporary tables usually are more efficient than using cursors, you should use temporary tables instead of cursors whenever possible. Try to avoid using temporary tables inside your stored procedure. Using temporary tables inside stored procedure reduces the chance to reuse the…...

This content is for Pro, Pro Member, Pro Member Annual - Fall Sale, Pro Member Monthly - Fall Sale, Standard, Standard Member, Standard Member Annual - Fall Sale, and Standard Member Monthly - Fall Sale members only.
Log In Register
Pro Members SQL Server Standard Members

Troubleshooting problems with SQL Server 2012 cursors

Troubleshooting problems with SQL Server 2012 cursors If you have problems with cursors in SQL Server 2012, review this troubleshooting checklist to find potential solutions. 1. Install the latest SQL Server 2012 service pack. Because many SQL Server 2012 cursor bugs were fixed in SQL Server service packs, you should install the latest SQL Server service pack. At the time…...

This content is for Pro, Pro Member, Pro Member Annual - Fall Sale, Pro Member Monthly - Fall Sale, Standard, Standard Member, Standard Member Annual - Fall Sale, and Standard Member Monthly - Fall Sale members only.
Log In Register
Pro Members SQL Server Standard Members

Troubleshooting problems with SQL Server 2008 R2 cursors

Troubleshooting problems with SQL Server 2008 R2 cursors If you have problems with cursors in SQL Server 2008 R2, review this troubleshooting checklist to find potential solutions. 1. Install the latest SQL Server 2008 R2 service pack. Because many SQL Server 2008 R2 cursor bugs were fixed in SQL Server service packs, you should install the latest SQL Server service…...

This content is for Pro, Pro Member, Pro Member Annual - Fall Sale, Pro Member Monthly - Fall Sale, Standard, Standard Member, Standard Member Annual - Fall Sale, and Standard Member Monthly - Fall Sale members only.
Log In Register