{"id":69247,"date":"2021-08-15T04:10:06","date_gmt":"2021-08-15T08:10:06","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/how-to-optimize-sql-server-cursors-38\/"},"modified":"2021-08-15T04:10:06","modified_gmt":"2021-08-15T08:10:06","slug":"how-to-optimize-sql-server-cursors-38","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=69247","title":{"rendered":"How to optimize SQL Server Cursors #38"},"content":{"rendered":"<pre><b>Optimize Cursors<\/b><ol><li> Avoid using SQL Server cursors whenever possible<\/li><li> Always close SQL Server cursors when result sets are not needed<\/li><li> Deallocate SQL Server cursors when the data structures comprising the cursors are not needed<\/li><li> Reduce the number of records to process in the cursor<\/li><li> Only use the required columns in the cursors <\/li><li> Use READ ONLY cursors, whenever possible, instead of updatable cursors.<\/li><li> Avoid using insensitive, static and keyset cursors, whenever possible.<\/li><li> Use FAST_FORWARD cursors, whenever possible.<\/li><li> Use FORWARD_ONLY cursors, if you need updatable cursors <\/li><\/ol><\/pre>\n<p>From: http:\/\/sitestree.com\/?p=4794<br \/> Categories:38<br \/>Tags:<br \/> Post Data:2010-03-10 01:20:46<\/p>\n<pre><code>    Shop Online: &lt;a href='https:\/\/www.ShopForSoul.com\/' target='new' rel=\"noopener\"&gt;https:\/\/www.ShopForSoul.com\/&lt;\/a&gt;\n    (Big Data, Cloud, Security, Machine Learning): Courses: &lt;a href='http:\/\/Training.SitesTree.com' target='new' rel=\"noopener\"&gt; http:\/\/Training.SitesTree.com&lt;\/a&gt; \n    In Bengali: &lt;a href='http:\/\/Bangla.SaLearningSchool.com' target='new' rel=\"noopener\"&gt;http:\/\/Bangla.SaLearningSchool.com&lt;\/a&gt;\n    &lt;a href='http:\/\/SitesTree.com' target='new' rel=\"noopener\"&gt;http:\/\/SitesTree.com&lt;\/a&gt;\n    8112223 Canada Inc.\/JustEtc: &lt;a href='http:\/\/JustEtc.net' target='new' rel=\"noopener\"&gt;http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) &lt;\/a&gt;\n    Shop Online: &lt;a href='https:\/\/www.ShopForSoul.com'&gt; https:\/\/www.ShopForSoul.com\/&lt;\/a&gt;\n    Medium: &lt;a href='https:\/\/medium.com\/@SayedAhmedCanada' target='new' rel=\"noopener\"&gt; https:\/\/medium.com\/@SayedAhmedCanada &lt;\/a&gt;\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Optimize Cursors Avoid using SQL Server cursors whenever possible Always close SQL Server cursors when result sets are not needed Deallocate SQL Server cursors when the data structures comprising the cursors are not needed Reduce the number of records to process in the cursor Only use the required columns in the cursors Use READ ONLY &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=69247\">Continue reading<\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1917],"tags":[],"class_list":["post-69247","post","type-post","status-publish","format-standard","hentry","category-fromsitestree-com","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":69249,"url":"http:\/\/bangla.sitestree.com\/?p=69249","url_meta":{"origin":69247,"position":0},"title":"What are cursors? #38","author":"Author-Check- Article-or-Video","date":"August 15, 2021","format":false,"excerpt":"Cursors are server side database objects that are used by applications to apply operations on the database table data on a row-by-row basis. The operations may vary from one row to another row dynamically based on the requirements (business logic) and also multiple operations can be performed on the same\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":69274,"url":"http:\/\/bangla.sitestree.com\/?p=69274","url_meta":{"origin":69247,"position":1},"title":"SQL Server Short-notes at JustETC #38","author":"Author-Check- Article-or-Video","date":"August 16, 2021","format":false,"excerpt":"How to optimize query response time? How to optimize SQL Server Cursors What are cursors? SQL Server Hints Scalability: SQL Server 2005 Scaling Out Dynamic Management Views SQL Server Database System Tuning SQL Server: Index SQL Server : Backups SQL Server Short-notes at JustEtc SQL Server Short-notes at JustEtc From:\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":69272,"url":"http:\/\/bangla.sitestree.com\/?p=69272","url_meta":{"origin":69247,"position":2},"title":"SQL Server Short-notes at JustEtc #38","author":"Author-Check- Article-or-Video","date":"August 16, 2021","format":false,"excerpt":"Query Optimization How to optimize query response time? SQL Server How to optimize SQL Server Cursors What are cursors? SQL Server Hints Scalability: SQL Server 2005 Scaling Out Dynamic Management Views SQL Server Database System Tuning SQL Server: Index SQL Server : Backups From: http:\/\/sitestree.com\/?p=5221 Categories:38Tags: Post Data:2012-10-04 19:57:27 Shop\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":70215,"url":"http:\/\/bangla.sitestree.com\/?p=70215","url_meta":{"origin":69247,"position":3},"title":"Must Read: Database Driven Software Development #106","author":"Author-Check- Article-or-Video","date":"August 29, 2021","format":false,"excerpt":"If you are developing database driven applications, you must need to know and clearly understand the following concepts. Yes, you also need to apply them in your design and implementation. If you do not follow proper database design strategies, many complexities will arise, adjusting new requirements may become cumbersome to\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":75826,"url":"http:\/\/bangla.sitestree.com\/?p=75826","url_meta":{"origin":69247,"position":4},"title":"Some Topics to Know and Understand to prepare for a DBMS related Job Interview","author":"Sayed","date":"June 25, 2023","format":false,"excerpt":"Some Topics to Know and Understand to prepare for a DBMS related Job Interview ACID ACID: https:\/\/www.geeksforgeeks.org\/acid-properties-in-dbms Database Normalization 1NF: No repeating groups possible for a cell, PK identified, dependencies mapped 2NF: No Partial Dependence. Non key attributes must have to depend on the full key 3NF: No transitive dependency.\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":24269,"url":"http:\/\/bangla.sitestree.com\/?p=24269","url_meta":{"origin":69247,"position":5},"title":"#laravel The First Deployment Health Checks and Rollbacks Deployment Hooks Multi-Server Deployment Server Directory Structure Testing in PHPStorm Alternation Custom Formatting Multiple Cursors","author":"Author-Check- Article-or-Video","date":"April 6, 2021","format":false,"excerpt":"The First DeploymentEnvoyer - Episode #1 TOOLING \u2022 MAR 16TH, 2015 \u2022 INTERMEDIATE \u2022 5:32 ADD TO WATCHLIST Health Checks and RollbacksEnvoyer - Episode #3 TOOLING \u2022 MAR 16TH, 2015 \u2022 INTERMEDIATE \u2022 2:20 ADD TO WATCHLIST Deployment HooksEnvoyer - Episode #4 TOOLING \u2022 MAR 16TH, 2015 \u2022 INTERMEDIATE \u2022\u2026","rel":"","context":"In &quot;Laravel&quot;","block_context":{"text":"Laravel","link":"http:\/\/bangla.sitestree.com\/?cat=1852"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/69247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=69247"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/69247\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=69247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=69247"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=69247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}