Skip to main content

Posts

Showing posts with the label Life Cycle of Cursor

Top 5 Ways to Improve Website Speed (Beginner Friendly)

Introduction Website speed is one of the most important ranking factors for Google. A slow site results in lower traffic, fewer conversions, and a bad user experience. Here are five simple, beginner-friendly ways to improve your website speed instantly. 1. Optimize Images Large images make your website slow. Tips: Reduce size Use WebP format Compress images 2. Enable Lazy Loading Lazy loading loads images only when a user scrolls to them. This reduces initial load time. 3. Reduce Widgets and Scripts Too many widgets (especially on Blogger) slow down the site. Remove: Unnecessary JavaScript Heavy widgets Popup ads 4. Use a CDN (Cloudflare) Cloudflare caches your website and serves it from nearby servers. This dramatically boosts speed. 5. Test Your Speed Regularly Use: Google PageSpeed Insights GTmetrix Lighthouse Fix any issues they report. Conclusion By optimizing images, using a CDN, and reducing scripts, your website becomes ...

SQL Server Basics of Cursor

C ursor is a database objects to retrieve data from a result set one row at a time, instead of the T-SQL commands that operate on all the rows in the result set at one time. We use cursor when we need to update records in a database table in singleton fashion means row by row. Life Cycle of Cursor Declare Cursor A cursor is declared by defining the SQL statement that returns a result set. Open A Cursor is opened and populated by executing the SQL statement defined by the cursor. Fetch When cursor is opened, rows can be fetched from the cursor one by one or in a block to do data manipulation. Close After data manipulation, we should close the cursor explicitly. Deallocate Finally, we need to delete the cursor definition and released all the system resources associated with the cursor. Syntax to Declare Cursor Declare Cursor SQL Comaand is used to define the cursor with many options that impact the scalablity and loading behaviour of the cursor. The b...