Tag: SQL Server Internals

Deep-dive content on how SQL Server works under the hood, including memory management, storage structures, execution internals, and engine behaviour.

  • RAND() vs NEWID() in SQL Server

    Most people searching for “random numbers in SQL Server” want one of two things: SQL Server gives you two common tools for this: RAND() and NEWID(). They solve different problems, and confusion usually starts when they are treated as interchangeable. This post shows how to use both, starting with simple examples, and explains why they…

  • Script: Get Memory Configuration and Usage

    This script shows how memory is configured for SQL Server and how much memory is currently being used. It helps confirm that instance-level memory settings are sensible and whether SQL Server or the host appears to be under memory pressure. This is commonly checked during performance investigations, post-build validation, and when reviewing servers that are…

  • Script: Get CPU Topology and Core Counts

    This script returns how CPU resources are presented to SQL Server, including NUMA nodes, CPU counts, and scheduler distribution. It helps confirm whether the instance is seeing the hardware as expected and whether CPU layout aligns with licensing, performance, and workload design. This is typically checked during performance investigations, new server validation, and post-migration reviews.…