SShortSingh.
Back to feed

B-Tree vs LSM-Tree: How Your Database's Storage Engine Shapes Performance

0
·33 views

Every database makes a foundational choice between two storage structures — B-trees and LSM-trees — that determines how it handles reads versus writes under load. B-trees update data in place, keeping records fully sorted for fast lookups, making them the default for read-heavy systems like PostgreSQL and MySQL. LSM-trees instead buffer writes in memory and flush them sequentially to disk, which makes them far more efficient for high-volume write workloads used by systems like Cassandra and RocksDB. However, LSM-trees introduce read overhead and a background compaction process that competes for disk I/O, which can spiral into serious latency issues under sustained write pressure. Engineers rarely make this choice consciously, but mismatching a workload — such as running high-ingest time-series data on a B-tree-backed database — can mean fighting the storage engine rather than solving the actual problem.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingHacker News ·

Terminal borders drawn without consuming a character cell

A blog post by Joshka explores a technique for drawing borders in terminal interfaces that does not take up an extra character cell. The article discusses how borders can be rendered in a way that avoids the layout cost typically associated with them. It was shared on Hacker News, where it gathered 12 points and 2 comments. The source material provided is limited to the article link and discussion metadata, so the specific implementation details are not summarized here.

0
ProgrammingDEV Community ·

Python Tutorial Shows How to Pull Funda Property Listings with Funda Scraper

A new guide explains how to use Python to extract Dutch sale and rental listings from funda.nl into structured data, including price, address, living area, rooms, energy label, agency and photo links. The author notes that Funda's search pages block simple HTTP requests, which is why the tutorial relies on the Funda Scraper Apify Actor. Readers need Python 3.11 or newer, a free Apify account and an API token, and the Actor handles the fetching so no custom scraping code is required. The example searches for rentals in Utrecht under 1,500 EUR per month and computes price per square metre from the returned fields. The same approach can serve buyers, tenants or analysts by changing the search input.

0
ProgrammingDEV Community ·

Herramientas de IA para crear apps: qué resuelven bien y dónde fallan en empresas medianas

Un artículo de DEV Community examina hasta dónde llegan las plataformas de creación de apps con IA, como FlutterFlow, Lovable y Bubble. Según el autor, estas herramientas sirven bien para validar ideas, construir formularios, catálogos y tableros internos, y reducen el costo de equivocarse en el prototipo. El texto distingue cuatro categorías: constructores visuales, generadores por prompt, apps sobre datos y herramientas de automatización. También advierte que, al integrarse con sistemas antiguos o propietarios comunes en empresas medianas, como ciertos ERP locales, aparecen límites técnicos importantes. El autor recomienda verificar las capacidades actuales de cada producto, ya que cambian con frecuencia.

0
ProgrammingDEV Community ·

Tutorial Shows How to Scrape Immobiliare.it Property Listings with Python and Apify

A DEV Community tutorial explains how to pull Italian property listings from Immobiliare.it into structured Python data using the unofficial Immobiliare.it Scraper Actor on Apify. The data covers prices, floor area in square metres, rooms, coordinates, features, and publicly listed agency and agent contacts, with no need to handle browsers, proxies, or HTML parsing. Setup requires Python 3.11 or newer, a free Apify account with an API token, and the official Apify Python client. The walkthrough uses a Torino rental search between 500 and 900 euros per month with at least two rooms as an example, ranking results by rent per square metre. The Actor is not affiliated with Immobiliare.it.