Skip to main content

Posts

Showing posts with the label Query for Automatic find table and set seed value in SQL Server

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 ...

Query for Automatic find table and set seed value in SQL Server

Declare @t table(Id INT identity(1,1), tName nvarchar(max), cName nvarchar(max)) Declare @t1 table(ID INT,tName nvarchar(max), cCount BIGINT) Declare @SQry nVarchar(MAX) = '', @tName nvarchar(max), @cName nvarchar(max) Declare @nCount int,@sCount int=1 Insert into @t(tName,cName) select a.name,b.name from sys.tables a inner join sys.all_columns b on a.object_id = b.object_id where b.is_identity = 1 select @nCount = COUNT(*) from @t While (@sCount <= @nCount) BEGIN select @tName = tname,@cName = cName from @t where id = @sCount --print N'select max('+ @cName +') nCount, '''+ @tName +''' Tname from '+ @tName +' having IDENT_CURRENT( '''+ @tName +''') <> max('+ @cName +')' Insert into @t1(ID,cCount, tName) exec (N'select '+ @sCount +', max('+ @cName +') nCount, '''+ @tName +''' Tname from '+ @tName +' having IDENT_C...