Skip to content

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Databases

16 min read

How LSM Tree Overturned B-Tree: The 1996 Innovation Behind Modern Write-Heavy Databases

This article traces the origin of the Log-Structured Merge-Tree (LSM Tree) from a 1996 paper by Patrick O'Neil et al., explaining how its sequential-write, background-compaction design solved the random I/O bottleneck of B-Trees, enabling modern write-heavy systems like Cassandra, RocksDB, and Kafka.

10 min read

Firebolt's Microservices Rollback: Lessons on Deployment, Coordination & Fault Isolation

Firebolt consolidated previously independent metadata, identity, and garbage-collection services into its core database process to simplify multi-environment deployment and reduce cross-service coordination, while analyzing trade-offs in fault isolation, resource contention, and the distinction between module and process boundaries.

23 min read

When Indexes Become Write Killers: MySQL Order Table Write Performance Collapse Postmortem

Adding three secondary indexes to a MySQL 8.0 orders table caused write P99 latency to jump from 15ms to 2.3s and TPS to drop from 4800 to 1100 during peak hours; the article details a reproducible forensic process using A/B testing, invisible indexes, and sysbench to prove the culprit index had zero read benefit and safely remove it.

4 min read

MySQL TPS Capacity Benchmarks by Server Specs: From 4-Core to 64-Core Reference Guide

This article defines TPS versus QPS, illustrates a multi-SQL transaction example, and provides a concrete reference table mapping MySQL server configurations (4-core/8GB through 64-core+) to typical OLTP TPS ranges (1,000–50,000+), concluding with architectural guidance for scaling beyond 10,000 TPS.

16 min read

Slow SQL Full-Chain Troubleshooting: Execution Plans, Index Failures & Lock Contention

This comprehensive guide covers the complete slow SQL troubleshooting lifecycle: enabling slow query logs, interpreting EXPLAIN plans, diagnosing nine common index failure patterns, resolving transaction lock contention, and applying architectural optimizations for large datasets, plus emergency mitigation and long-term governance practices.

21 min read

PostgreSQL JSONB with Spring Boot: Handle Custom Fields Without MongoDB

This article demonstrates how PostgreSQL's JSONB type combined with Spring Boot provides a practical alternative to MongoDB for managing dynamic custom fields in enterprise applications, covering storage, indexing, JPA mapping, partial updates, querying patterns, and performance tuning while preserving relational integrity.

25 min read

StarRocks AI Function: Embedding LLM Inference into the SQL Execution Pipeline

StarRocks introduces AI Functions that let SQL directly call LLMs for generation, classification, extraction, and embedding, integrating model inference into the query optimizer and pipeline execution engine with async dual-pipeline architecture, backpressure, and cost-based optimization to reduce unnecessary calls and manage latency.

24 min read

ZestKV: 360's Cloud-Native Serverless KV Store with Compute-Storage Separation

360 Zhihui Cloud's ZestKV is a Redis-compatible, cloud-native serverless KV store that separates compute from storage using shared object storage and a log service, enabling elastic scaling via region sharding, background task decoupling, and a dual-async write path achieving 700K SET QPS in benchmarks.

12 min read

MySQL MGR Cluster: Paxos Consensus, Zero-Downtime HA & Brain-Split Proof Architecture

This article explains MySQL Group Replication (MGR), a native high-availability cluster based on Paxos consensus, covering its architecture, single-primary vs multi-primary modes, automatic failover, brain-split prevention via majority voting, production deployment rules, and common pitfalls to avoid for zero-data-loss transactional systems.

6 min read

Three-Field Schema for Encrypted Phone Number Queries by Last Four Digits

The article analyzes flawed approaches for querying encrypted phone numbers by last four digits — memory decryption, ciphertext fuzzy matching, partial encryption, and mapping tables — and presents a three-field design (full ciphertext, masked display, indexed last-four plaintext) that ensures compliance, security, and millisecond query performance at million-user scale.

76 min read

MySQL Interview Panorama: Architecture, Indexes, Transactions, Locks & Sharding Guide

This comprehensive guide covers MySQL core internals for interview preparation: four-layer architecture, SQL execution flow, InnoDB vs MyISAM, B+Tree/Hash/Fulltext indexes, clustered vs non-clustered indexes, leftmost prefix principle, covering indexes, index condition pushdown, ACID with redo/undo logs, MVCC and ReadView, isolation levels, row/gap/next-key locks, two-phase commit, SQL optimization with EXPLAIN and slow query logs, sharding strategies with ShardingSphere, master-slave replication and GTID, and deep pagination solutions.

11 min read

MySQL 9.0 GA: JSON Multi-Valued Indexes, Parallel Query V2, and AI Optimizer Deep Dive

MySQL 9.0 introduces three major features: native JSON multi-valued indexes delivering 370x faster array queries, Parallel Query V2 with work-stealing achieving 7-8x speedups on analytical workloads, and an ML-based AI query optimizer that cuts index misselection from 12% to 2% and boosts complex query performance by 25-40%.

52 min read

MySQL Slow Query Mastery: From Log Analysis to Index Optimization

This comprehensive guide walks through the complete MySQL slow query troubleshooting loop: enabling slow query logs, analyzing with mysqldumpslow and pt-query-digest, using EXPLAIN to identify missing indexes or inefficient plans, designing composite indexes following leftmost prefix principles, validating in test environments, and safely deploying changes in production with rollback plans.

12 min read

MySQL Master-Slave Replication: Sync Principles, Delay Fixes, Read-Write Splitting & Failover

This article provides a comprehensive practical guide to MySQL master-slave replication, covering synchronization principles, three replication modes, delay causes and troubleshooting, read-write splitting implementation with common pitfalls, failover strategies, and five production pitfalls to avoid.

9 min read

Apache Fluss Virtual Tables: $changelog vs $binlog for Queryable Change Streams

This article deep-dives into Apache Fluss virtual tables, explaining how $changelog and $binlog suffixes expose change logs as read-only queryable tables, detailing their schemas, use cases, differences between PrimaryKey and Log tables, startup modes, limitations, and the design philosophy enabling native CDC consumption via SQL without external tools.