Posts

Image
Difference between  Clustered  Index Scan and Index Scan in SQL Server 1.Clustered Index Scan ✅ What it is: A Clustered Index Scan means SQL Server is scanning every row of the entire table,  essentially performing a "table scan" because the clustered index is the table itself.  📌 When it happens: No WHERE clause or very broad filter (low selectivity). Join/filter columns aren’t indexed selectively. Query needs most or all columns (covering queries). 🧠 Performance Insight: Can be expensive for large tables. Usually appears when SQL Server can’t seek and needs to read all data. Example:    Table: CREATE TABLE dbo.Sales (     SaleID INT NOT NULL IDENTITY,     SaleDate DATE NOT NULL,     Quantity INT NOT NULL, PRIMARY KEY (SaleID) ) Query: SELECT * FROM dbo.Sales WHERE  SaleDate  BETWEEN '2025-02-04' AND '2025-02-10' 2. Index Scan (Non-Clustered) ✅ What it is: A Non-Clustered Index Scan scans all rows in a specific n...

What is a Nested Loop Join in SQL Server: Understanding the Execution Plan

Image
Nested Loop Join in SQL Server Execution Plan 🧩 What Is a Nested Loop Join? A Nested Loop Join is a physical join operator used by SQL Server to combine rows from two input tables based on a specified join condition. It is best suited when: The outer input (typically the smaller dataset) is small. The inner input is indexed on the join key. This operator iteratively compares each row from the outer table with matching rows from the inner table , evaluating the join condition each time. ⚙️ How It Works – Execution Flow Read the first row from the outer input (top table). Use the join key from this row to search (seek/scan) the inner input (bottom table) for matching rows. If matches are found, combine the outer and inner rows and return them as part of the result. Repeat this process for each row in the outer input. 🧱 Understanding Outer and Inner Inputs   Outer Table      The input table processed first. SQL Server loops ...
Image
While executing Select query to pull data from a different server, SQL Server is showing following error: Msg 7202, Level 11, State 2, Line 1 Could not find server 'LAPTOP-09O6NE3K\SQLEXPRESS03' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers. Completion time: 2024-02-05T17:18:24.6869756+05:30 Solution: Step1:  Check if the server is available in the sys.servers table SELECT name from sys.servers Step2:  If no, add the new server to the sys.servers table EXEC sp_addlinkedserver @server = 'server name' Eg" EXEC sp_addlinkedserver @server = 'LAPTOP-09O6NE3K\SQLEXP RESS03' Step3:  Recheck if the new server name is added to the sys.servers table. If yes, try then rerunning the select query which throwed the error. Now it should pull data from the table in the new server successfully.    
Image
  Microsoft Power BI- Solve Problem  "Map and Filled Map Visuals aren't Enabled"   When you try to use Map or Filled Map from Visuals for the 1st time , you may get the following warning : "Map and Filled Map Visuals are disabled". This means you need to go to Options and have to enable these Visuals. Go to File ->Options and Settings-> Options -> Security-> Enable Map and Filled Map Visuals. (After this, in some cases you may need to close and reopen Power BI desktop) Now Go to Add Visual Then double click on Map or Filled Map. After that, you will be able to add Location, Legends etc. without any issues.
Image
For an experienced database engineer, leveraging the social media like starting a tech channel in social media to share the knowledge, explaining the latest features, and using the skills to provide solutions for any SQL issues, all these  would greatly help certain audiences and ultimately help to stand out in a competitive online landscape. Starting a tech channel offers several advantages for an experienced professional, like: 1. Reach Global Audience:  Since YouTube has a massive user base, there will be users who will be searching for the kind of information you have shared on your channel. In that way, you can connect with a wide range of audiences and build a large professional network. 2. Showcase Expertise:  Leverage the video sharing platform to showcase your technical knowledge and talents. 3. Build credibility:  Find your niche in the database world and consistently create quality contact; all this makes you an authority in your niche. 4. Engage with view...
Image
Top 10 essential SQL skills for data analysts, data engineers, and data scientists Photo by  Carlos Muza  on  Unsplash It doesn’t matter how good you are at creating visualizations, extracting insights, or building complicated models; you need data in order to do those things. SQL enters the picture when it comes to extracting data from the database in order to work with it. Mastering the commonly used SQL concepts is essential to work effectively as a data analyst, data engineer, and data scientist in today's world.  The following are the top 10 skills for mastering SQL: 1. Knowing SQL Fundamentals:  Understanding the following keywords is essential to write common DML queries: SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY, WINDOW\RANK FUNCTIONS. 2. Understanding different real-world scenarios:  Analyzing and understanding multiple domains and how to use SQL, like writing complex queries, manipulating data, pulling reports, and identifying patterns and t...

Appreciation letter from clients

Image