In the world of Linux system administration and development, comparing files is an essential task when you are updating configuration files, reviewing code changes, or troubleshooting issues, the ability to compare two text files and quickly spot the differences can save you time and help you avoid costly errors. In this guide, we’ll walk you through various methods to compare text files in Linux, from basic command-line tools to advanced visual diff tools. Each method has its own strengths, and we’ll explain when to use which one. A Quick Scenario Imagine you have two versions of a config file: file1.txt…
Author: drweb
Traditional observability tools hook into your infrastructure, grabbing logs, traces and metrics. In theory, if you collect enough data, you will know what is happening in your system. Except that is not really how it works. The problem is that these tools only monitor a small subset of what is a large, complex and connected system. They tend to ignore critical signals like application behavior, system configurations or interactions between internal tools. This creates blind spots that make debugging slow, tedious and ultimately harder than it needs to be. In the short term, it puts significant strain on the engineering…
Deadlocks can feel like a mystery, but they don’t have to be! In today’s episode, we’ll explore how to simulate and capture deadlocks in SQL Server using the powerful SQL Server Profiler.What Are Deadlocks?Deadlocks occur when two or more processes are waiting for resources held by each other, creating a circular wait. SQL Server resolves this by picking a “victim” process to terminate so the other transactions can continue.Capturing Deadlocks in SQL ServerTo analyze deadlocks effectively, we need to enable the right tools:Enable Trace FlagsSQL Server logs deadlock details in the error log when you enable trace flags 1204 and…
Sorting large datasets in SQL Server can significantly impact performance, especially when it leads to tempdb spills. This post explores why this happens, how to identify it, and some quick tips to optimize your queries.What Causes TempDB Spills?Tempdb spills occur when SQL Server does not allocate enough memory for operations like sorting. The spill results in SQL Server writing intermediate data to tempdb, which introduces additional I/O overhead. Here’s an example scenario:The sort operator processes over 121,317 rows, but SQL Server grants only 6,000 KB of memory.Insufficient memory causes the operation to spill, leading to:460 pages written to tempdb.Approximately 10…
Hey there, fellow developers and DevOps champions! I’m excited to share a workflow that has transformed my teams’ development experience time and time again: pairing Docker and Visual Studio Code (VS Code). If you’re looking to speed up local development, minimize those “it works on my machine” excuses, and streamline your entire workflow, you’re in the right place. I’ve personally encountered countless environment mismatches during my career, and every time, Docker plus VS Code saved the day — no more wasted hours debugging bizarre OS/library issues on a teammate’s machine. In this post, I’ll walk you through how to get…
Execution timeout in SSMS are a small but important feature that can help you manage query performance. By default, SSMS allows queries to run indefinitely, but there are times when limiting execution time can prevent issues in both testing and production environments. In this post, we’ll explore why and how to adjust execution timeouts and their practical use cases.Why Adjust Execution Timeouts?Testing QueriesWhen testing or troubleshooting, you may not want queries to run longer than necessary. A timeout ensures they don’t consume resources endlessly.Production SystemsOn live systems, long-running queries can block other operations and degrade performance. Limiting execution time protects…
ANSI PADDING is an often-overlooked yet impactful setting in SQL Server that determines how trailing spaces are handled in CHAR and VARCHAR columns. By default, ANSI_PADDING is ON, and it plays a significant role in data storage and consistency. In this post, we’ll explore what ANSI_PADDING does, why it matters, and how it affects your database.Why Does ANSI_PADDING Matter?Storage EfficiencyTurning ANSI_PADDING OFF for fixed-length columns can save storage space when trailing spaces are unnecessary.Data ConsistencyKeeping ANSI_PADDING ON ensures predictable storage behavior across different databases.Application RequirementsFor VARCHAR columns, turning ANSI_PADDING OFF prevents unwanted spaces, which might be critical for some applications.Best…
If you’ve ever run a SQL query that looks simple but takes longer than expected, one likely culprit is the Key Lookup. This often-overlooked operation can quietly slow things down—especially when you’re dealing with large datasets and high-frequency queries. In this blog post, we’ll explore what a Key Lookup is, how to spot it, and most importantly, how to eliminate it using a covering index. We’ll walk through a real-world demo and use actual execution plans to visualize the performance gain.What’s a Key Lookup?A Key Lookup occurs when SQL Server uses a nonclustered index to find rows that match a…
I am running a Spring sale on all my currently published Python books. You can get 25% off any of my complete books by using this code at checkout: MSON4QP Learn Python Today! I have books on the following topics: Basic Python Intermediate Python Python and PDFs Python and Excel Image Processing with Python Python Logging JupyterLab and Jupyter Notebook Creating GUIs with wxPython and more! Start learning some Python today!
Microsoft Fabric is transforming real-time analytics for financial institutions. It provides a unified data platform. This platform integrates various data sources into a single, cohesive system. This integration breaks down data silos. It enhances decision-making and customer insights. Fabric’s real-time intelligence capabilities allow financial institutions to extract insights from data as it flows. This enables immediate decision-making. It supports critical functions like fraud detection, risk management, and market trend analysis.With AI embedded throughout the Fabric stack, routine tasks are automated. Valuable insights are generated quickly. This boosts productivity and keeps organizations ahead of industry trends. Additionally, Fabric ensures data quality,…
