Let's talk about why we have to wait and how to understand the wait types. Paul Randal in his post Wait statistics, or please tell me where it hurts said: A thread is using the CPU (called RUNNING) until it needs to wait for a resource. It then moves to an unordered list of threads … Continue reading Wait wait wait…
What's a heap table? I would say it's a table without clustered index. What's the characteristic of a heap table? The data isn't ordered. What's the consequence having a heap table? There are a few: Specific data is not retrived quickly Data pages aren't linked, that means sequential access needs to refer to the index … Continue reading Heap Tables
Great news, a visual way to manage SQL Server from Linux. SQL Operations Studio came to fill a gap we were waiting to develop and manage SQL Server databases on Linux. In the link https://github.com/Microsoft/sqlopsstudio we can see more information like the features below. Feature Highlights Cross-Platform DB management for Windows, macOS and Linux with … Continue reading SQL Operations Studio Linux
A simple script to know how much space the tables are taking from the disk. SELECT t.name AS TableName , s.name AS SchemaName , p.rows AS RowCounts , CAST(ROUND(((SUM(a.total_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS TotalMB , CAST(ROUND(((SUM(a.used_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS UsedMB , CAST(ROUND(((SUM(a.total_pages) - SUM(a.used_pages)) … Continue reading Script to get the tables size in SQL Server
Update data in SQL Server is a simple task. Using the command update table set column = value where column = value. Don't forget the where clause :). But, what SQL Server does internally? Delete plus Insert? Modify? Well, the answer depends. Let's see examples how that works. First, create a database and table for … Continue reading How Update works?
I like tools and I’ve used a couple of them. I had the opportunity to try SQL Examiner to compare database structures and even though compare data. The tool is quite simple to configure the options. Talking about comparison, well we compare one database with another. Imagine a situation, there are two environments (development and … Continue reading SQL Examiner Tool