<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Databases on Netdata</title><link>https://www.netdata.cloud/categories/databases/</link><description>Recent content in Databases on Netdata</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 01 Sep 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://www.netdata.cloud/categories/databases/index.xml" rel="self" type="application/rss+xml"/><item><title>PostgreSQL 17 Cardinality Estimation &amp; Tuning Tips</title><link>https://www.netdata.cloud/academy/cardinality-estimation-in-postgres/</link><pubDate>Mon, 01 Sep 2025 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/academy/cardinality-estimation-in-postgres/</guid><description>&lt;p>You&amp;rsquo;ve seen it before: a query that runs in milliseconds on your staging server takes minutes to execute in production. Or a seemingly simple &lt;code>JOIN&lt;/code> causes the &lt;code>query_planner&lt;/code> to choose a disastrously slow Nested Loop over a much faster Hash Join. In almost every case, the root cause of these performance mysteries is not a bug in PostgreSQL, but a flaw in its understanding of your data. This is the challenge of &lt;code>cardinality_estimation&lt;/code>. The planner is only as smart as the statistics it&amp;rsquo;s given, and when its &lt;code>row_estimation&lt;/code> is wrong, the consequences are severe.&lt;/p></description></item><item><title>Using FOR UPDATE SKIP LOCKED For Queue Workflows</title><link>https://www.netdata.cloud/academy/update-skip-locked/</link><pubDate>Fri, 29 Aug 2025 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/academy/update-skip-locked/</guid><description>&lt;p>One of the most common and powerful patterns in modern application development is the job queue. Whether you&amp;rsquo;re sending emails, processing images, or running complex calculations, offloading tasks to background workers is essential for building responsive and scalable systems. Many developers reach for dedicated queueing software like RabbitMQ or Redis, but for many use cases, your primary PostgreSQL database already has all the tools you need to build a robust, transactional, and incredibly performant &lt;code>job_queue_postgres&lt;/code>.&lt;/p></description></item><item><title>How Autovacuum Causes PostgreSQL Deadlocks</title><link>https://www.netdata.cloud/academy/autovaccum-vs-deadlock/</link><pubDate>Tue, 26 Aug 2025 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/academy/autovaccum-vs-deadlock/</guid><description>&lt;p>You&amp;rsquo;ve meticulously optimized your application queries. Your transaction logic is sound. Yet, under heavy load, your system seizes up, logging the dreaded &amp;ldquo;deadlock detected&amp;rdquo; error. You dig into the logs, expecting to find two application transactions locked in a deadly embrace, but instead, you find a surprising culprit: one of the participants is the PostgreSQL &lt;code>autovacuum&lt;/code> process. How can a routine maintenance task, designed to keep the database healthy, be the cause of a production-stopping &lt;code>postgres_deadlock&lt;/code>?&lt;/p></description></item><item><title>Short vs Long Transactions In PostgreSQL Benchmarks</title><link>https://www.netdata.cloud/academy/benchmarking-short-long-transactions-in-postgresql/</link><pubDate>Wed, 09 Jul 2025 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/academy/benchmarking-short-long-transactions-in-postgresql/</guid><description>&lt;p>Every developer working with a database faces a fundamental design choice: how to structure their transactions. Should a complex business operation, involving multiple database writes, be wrapped in a single, all-or-nothing transaction? Or is it better to break it down into a series of smaller, faster commits? On the surface, the &lt;code>long_running_transaction&lt;/code> seems safer, guaranteeing perfect atomicity. But as traffic grows, a mysterious performance degradation can set in. Latency spikes, throughput drops, and users start seeing errors. The culprit is often not the queries themselves, but the invisible contention they create.&lt;/p></description></item><item><title>Garbage Collection In Java What It Is and How It Works</title><link>https://www.netdata.cloud/academy/java-garbage-collection/</link><pubDate>Mon, 09 Jun 2025 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/academy/java-garbage-collection/</guid><description>&lt;p>One of the most powerful features of the Java platform is its automatic memory management. Unlike languages like &lt;a href="https://www.netdata.cloud/academy/how-to-find-memory-leak-in-c/">C or C++&lt;/a>, where developers must manually allocate and deallocate memory, Java handles this process for you through a process called garbage collection (GC). This frees developers to focus on application logic rather than the complexities of memory management, which is a major reason for Java&amp;rsquo;s enduring popularity.&lt;/p>
&lt;p>But what exactly is garbage collection in Java, and how does it work under the hood? While it&amp;rsquo;s an automatic process, a solid understanding of the Java garbage collector is crucial for writing high-performance, stable applications and for troubleshooting &lt;a href="https://www.netdata.cloud/academy/java-memory-leak/">memory-related issues&lt;/a> like the dreaded &lt;code>OutOfMemoryError&lt;/code>.&lt;/p></description></item><item><title>Whats The Difference Between PostgreSQL vs MySQL</title><link>https://www.netdata.cloud/academy/postgres-mysql-differences/</link><pubDate>Mon, 09 Jun 2025 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/academy/postgres-mysql-differences/</guid><description>&lt;p>When building an application, one of the most fundamental decisions you&amp;rsquo;ll make is choosing the right database. For many developers, this choice boils down to two of the most popular open-source relational databases in the world: PostgreSQL and MySQL. Both are powerful, reliable, and backed by strong communities, but they operate on different philosophies and excel in different areas.&lt;/p>
&lt;p>Making the right choice between &lt;code>PostgreSQL vs MySQL&lt;/code> isn&amp;rsquo;t about finding a single &amp;ldquo;best&amp;rdquo; database, but understanding which one aligns with your application&amp;rsquo;s specific needs. This guide breaks down the critical differences in their architecture, features, performance characteristics, and ideal use cases to help you make an informed decision for your next project.&lt;/p></description></item><item><title>What Is Database Concurrency? Problems &amp; Control Techniques</title><link>https://www.netdata.cloud/academy/what-is-database-concurrency/</link><pubDate>Sun, 04 May 2025 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/academy/what-is-database-concurrency/</guid><description>&lt;p>Imagine trying to book the very last seat on a popular flight online. At the exact same moment, another person clicks &amp;ldquo;confirm&amp;rdquo; for the same seat. How does the system ensure only one booking goes through and the database remains accurate? This scenario highlights the core challenge of &lt;strong>database concurrency&lt;/strong>.&lt;/p>
&lt;p>In today&amp;rsquo;s world, &lt;a href="https://www.netdata.cloud/academy/what-is-application-performance-monitoring-apm/">almost every application interacts with databases&lt;/a> accessed by multiple users or processes simultaneously. &lt;strong>Database concurrency&lt;/strong> is the ability of a Database Management System (DBMS) to handle these simultaneous operations efficiently while maintaining data integrity and consistency. For developers, DevOps engineers, and SREs, understanding concurrency is vital for building reliable and performant applications. Let&amp;rsquo;s explore what concurrency entails, the problems it can cause if unmanaged, and the techniques used to control it.&lt;/p></description></item><item><title>Normalized vs Denormalized - Choosing The Right Data Model</title><link>https://www.netdata.cloud/academy/normalized-vs-denormalized/</link><pubDate>Sat, 03 May 2025 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/academy/normalized-vs-denormalized/</guid><description>&lt;p>When designing databases, one of the fundamental decisions you&amp;rsquo;ll face is how to structure your data. Two primary approaches dominate this discussion: normalization and denormalization. Choosing between a &lt;strong>normalized vs denormalized&lt;/strong> model significantly impacts data integrity, storage efficiency, and query performance. Understanding this trade-off is crucial for developers, database administrators, and SREs responsible for building and maintaining reliable, efficient systems.&lt;/p>
&lt;p>Getting the data model right from the start can save considerable headaches down the line. Let&amp;rsquo;s explore what &lt;strong>normalized data&lt;/strong> and &lt;strong>denormalized data&lt;/strong> mean, their respective strengths and weaknesses, and how to decide which strategy best fits your specific needs.&lt;/p></description></item><item><title>Database Backup - Types, Process and Benefits</title><link>https://www.netdata.cloud/academy/what-is-database-backup/</link><pubDate>Mon, 28 Apr 2025 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/academy/what-is-database-backup/</guid><description>&lt;p>Data is often called the lifeblood of modern organizations. From customer details and financial records to &lt;a href="https://www.netdata.cloud/solutions/webserver-monitoring/">application configurations and operational logs&lt;/a>, databases store the critical information that powers business operations. But what happens if that data is lost due to hardware failure, accidental deletion, software corruption, or a cyberattack? Without a safety net, the consequences can be catastrophic, leading to costly downtime, reputational damage, and potentially irreparable business harm. This is where &lt;strong>database backup&lt;/strong> becomes indispensable.&lt;/p></description></item><item><title>All Types Of Databases: Advantages &amp; Examples</title><link>https://www.netdata.cloud/academy/types-of-databases/</link><pubDate>Thu, 17 Apr 2025 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/academy/types-of-databases/</guid><description>&lt;p>This is a tech-savvy exploration of &lt;strong>database types&lt;/strong>! From the structured precision of relational models to the dynamic versatility of NoSQL, we’re diving deep into each &lt;strong>DB type&lt;/strong>, unpacking their perks, and dishing out some examples to help you pick the perfect fit for your digital toolbox.&lt;/p>
&lt;h2 id="what-is-a-database">What Is A Database?&lt;/h2>
&lt;p>&lt;strong>A database is a structured collection of stored data&lt;/strong>, that allows easy access, management, and updating. They come in various types to suit different needs; from hierarchical databases that organize data in a tree-like format to relational databases that use tables and relationships among those data. Databases are essential to build any tech product from small mobile apps to large-scale enterprise systems. They help you handle, search, and efficiently utilize large data sets.&lt;/p></description></item><item><title>What Is Database Clustering? Types &amp; Benefits</title><link>https://www.netdata.cloud/academy/whatisdatabaseclusteringtypesbenefits/</link><pubDate>Thu, 06 Mar 2025 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/academy/whatisdatabaseclusteringtypesbenefits/</guid><description>&lt;p>&lt;strong>Database clustering&lt;/strong> is a robust strategy employed to enhance the &lt;strong>performance&lt;/strong>, &lt;strong>scalability&lt;/strong>, and &lt;strong>availability&lt;/strong> of databases by orchestrating the distribution of data across multiple servers. This setup doesn&amp;rsquo;t just streamline handling big data; it also keeps things running smoothly, even if some nodes go down. That way, your service stays up and available no matter what happens.&lt;/p>
&lt;p>By diving into the various &lt;strong>types of database clustering architectures&lt;/strong>, in this article we explain how each setup addresses specific needs and challenges within IT environments. We&amp;rsquo;ll also examine the tangible benefits that database clustering brings to businesses, from improved data redundancy to enhanced query response times.&lt;/p></description></item><item><title>How to Troubleshoot Slow Queries in MongoDB</title><link>https://www.netdata.cloud/academy/how-to-troubleshoot-slow-queries-in-mongodb/</link><pubDate>Mon, 27 May 2024 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/academy/how-to-troubleshoot-slow-queries-in-mongodb/</guid><description>&lt;p>MongoDB is a popular NoSQL database known for its flexibility and scalability. However, as with any database system, you might encounter slow queries that can impact the &lt;a href="https://www.netdata.cloud/academy/what-is-application-performance-monitoring-apm/">performance of your application&lt;/a>. In this guide, we’ll walk you through the steps to troubleshoot and optimize slow queries in MongoDB, ensuring your database runs efficiently.&lt;/p>
&lt;h2 id="understanding-the-basics">Understanding the Basics&lt;/h2>
&lt;p>Before diving into troubleshooting, it&amp;rsquo;s important to understand some basic concepts in MongoDB:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Collections and Documents:&lt;/strong> MongoDB stores data in collections, which are analogous to tables in relational databases. Each collection contains documents, which are JSON-like data structures.&lt;/li>
&lt;li>&lt;strong>Indexes:&lt;/strong> Indexes improve query performance by allowing the database to quickly locate the data without scanning every document.&lt;/li>
&lt;li>&lt;strong>Query Plans:&lt;/strong> MongoDB evaluates different ways to execute a query and chooses the most efficient plan.&lt;/li>
&lt;/ul>
&lt;h3 id="identifying-slow-queries">Identifying Slow Queries&lt;/h3>
&lt;p>Using the &lt;code>slowms&lt;/code> Parameter
MongoDB logs operations that take longer than a specified threshold. By default, this threshold (&lt;code>slowms&lt;/code>) is set to 100 milliseconds. You can adjust this setting to catch slower operations more effectively:&lt;/p></description></item><item><title>What Is Cardinality In Databases: A Comprehensive Guide</title><link>https://www.netdata.cloud/academy/what-is-cardinality-in-databases-a-comprehensive-guide/</link><pubDate>Mon, 29 Jan 2024 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/academy/what-is-cardinality-in-databases-a-comprehensive-guide/</guid><description>&lt;h2 id="an-introduction-to-cardinality">An Introduction To Cardinality&lt;/h2>
&lt;p>Cardinality is a fundamental concept in databases that plays a crucial role in designing efficient databases and optimizing query performance. For those new to databases, understanding what is cardinality is essential for effective data management. This comprehensive guide will explain the meaning of cardinality, its types, and its &lt;a href="https://www.netdata.cloud/mongodb-monitoring/">impact on database performance&lt;/a>, making it accessible for both beginners and intermediate users.&lt;/p>
&lt;h2 id="what-is-cardinality-in-databases">What Is Cardinality In Databases?&lt;/h2>
&lt;p>Cardinality in databases refers to the uniqueness of data values contained in a column. It essentially measures how many distinct values exist in a column compared to the total number of rows in a table.&lt;/p></description></item></channel></rss>