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

18 min read

PostgreSQL Beats MySQL for AI: Extensions, Vector Search, Unified Data

PostgreSQL surpasses MySQL in popularity due to its extensibility, enabling vector search via pgvector, full-text search, and geospatial queries within a single database, simplifying AI application architectures by unifying business data, embeddings, and search while reducing synchronization overhead, though careful testing with real data is essential.

31 min read

MySQL Deep Pagination: Cursor, Deferred Join & Export Strategies for Million-Row Tables

This article explains why MySQL LIMIT offset queries become slow at scale, detailing deferred joins, cursor pagination with composite keys, secure cursor encoding, streaming exports, Elasticsearch search_after, and sharding considerations, with Java code examples and execution plan verification.

16 min read

Why PostgreSQL Is Replacing MySQL for AI-Driven Applications

PostgreSQL has overtaken MySQL in developer popularity, driven by its extensibility for AI workloads like vector search (pgvector), full-text search, and hybrid retrieval, allowing teams to consolidate search and business data in one database while reducing sync complexity, though real-world testing is essential to validate performance and resource trade-offs.

14 min read

Why Redis Default Config in Production Is a Security Disaster (And How to Fix It)

This guide explains why Redis default configuration exposes servers to unauthorized access attacks, detailing six critical settings to change—authentication, network binding, protected mode, port exposure, dangerous commands, and non-root execution—plus memory limits, eviction policies, slow logging, big key detection, backup procedures, and a pre-launch checklist for production-ready Redis deployments.

35 min read

MySQL Deadlock & Lock Wait Troubleshooting: Rapid Mitigation & Root Cause Analysis Guide

This guide provides a systematic approach to diagnose and resolve MySQL deadlocks (error 1213) and lock wait timeouts (error 1205) using read-only queries on performance_schema, explains InnoDB locking mechanics including gap locks and MDL, and offers safe mitigation strategies with a controlled kill script.

9 min read

Redis Large Key & Multi-Key Splitting: 4 Practical Patterns for Big Values, Massive Collections, and Bloom Filters

The article details four Redis splitting strategies: sharding oversized single-key values via multiGet or hash fields, bucket-sharding large hash/set/zset/list collections using client-side hash modulo, consolidating hundreds of millions of string keys into hash structures to cut memory overhead, and partitioning large bitmaps or Bloom filters into independent shards while preserving false-positive rates.

21 min read

Zero-Downtime MySQL Migration at 100M Rows: Dual-Write Pattern & MyBatis Plugin Design

This article details vivo's zero-downtime migration of 100M-row MySQL tables for their game center appointment service, covering dual-write strategy selection, MyBatis plugin implementation for seamless data source switching, auto-increment ID consistency challenges, async write pitfalls, and a seven-step cutover process with rollback safeguards.

12 min read

Redis High Availability: Three Tiers from Replication to Cluster — Choose the Right Level

This article explains Redis high availability as a three-tier progression — master-slave replication for redundancy, Sentinel for automatic failover, and Cluster for sharding — detailing configuration, split-brain prevention, multi-key limitations, and a decision framework to avoid over-engineering.

15 min read

Why PostgreSQL Is Overtaking MySQL for AI Applications: Extensions, Vector Search, and Unified Data

PostgreSQL now leads MySQL in developer adoption (57.9% vs 35.1% in Stack Overflow 2026) because its extension ecosystem lets teams add vector search, full-text search, and geospatial queries directly in SQL, reducing the need for separate search or vector databases while requiring careful evaluation of indexing strategies, filtering behavior, and resource contention.

12 min read

Redis Persistence: RDB, AOF, Hybrid & the Pure Cache Dilemma

This article explains Redis persistence mechanisms (RDB snapshots, AOF logging, hybrid persistence), their trade-offs (fork latency, memory overhead, data loss windows), and provides a decision framework: disable persistence for pure caches backed by a database, enable RDB+AOF everysec for caches with locks/counters, and never rely on Redis as the sole source of truth.

60 min read

MySQL Slow Query Analysis & Execution Plan Deep Dive: From Cost Model to Production Fixes

A comprehensive technical guide dissecting MySQL slow query root causes through execution plan analysis, covering optimizer cost models, index internals, statistics sampling flaws, 8.4 default changes, and three real-world failure cases with step-by-step forensic scripts and rollback strategies.

16 min read

30 MySQL SQL Query Optimization Techniques: Practical Guide with Examples

This comprehensive guide covers 30 practical MySQL SQL query optimization techniques, including indexing strategies, join optimization, subquery rewrites, pagination, sorting, wildcard handling, and table design best practices, each illustrated with concrete SQL examples to improve database performance and query efficiency.

20 min read

Why Historical Approval Records Change: The Missing Snapshot Fields

The article reveals how storing only foreign keys in approval records causes historical data to reflect current organizational changes, and demonstrates adding snapshot fields to preserve the state at approval time, distinguishing between current relationships and historical facts.

14 min read

TaurusDB AI Slow SQL Diagnosis: LLM-Assisted Tuning Cuts Query 90% in TPC-H Test

TaurusDB's AI_ANALYZE_SLOW_SQL function automatically collects execution plans, optimizer traces, and schema statistics, sends them to a large language model via MaaS, and returns a diagnostic report with index recommendations; a TPC-H Q14 test on TaurusDB MySQL 2.0.81 showed a covering index reduced query latency from 2.2s to 0.2s (90% improvement).

48 min read

OntologyL_Cypher 2.0 DSL Spec: Chain-Based Graph Query Language with 97 Methods

OntoL-Manage OntologyL_Cypher 2.0 DSL is a chain-based graph object language with 97 executable methods across 13 semantic categories, featuring dual-channel parameter access ($/#), explicit write-back semantics, four-state data flow, static validation, and integrated time, spatial, and OWL 2 RL constraint evaluation for ontology-driven graph operations.

18 min read

MySQL COUNT(*) Optimization: Debunking Myths & Real Solutions for Large Tables

This article debunks common MySQL COUNT(*) optimization myths, explains why InnoDB's MVCC architecture requires full index scans for exact counts, and presents layered strategies including estimation via information_schema, redundant counters with Redis, data archiving, partitioning, covering indexes, and offloading analytics to ClickHouse or Elasticsearch.

18 min read

Xiaohongshu's MySQL Kernel Optimizations: Merge Seckill, Thread Pool & Nonblocking DDL

Xiaohongshu details four MySQL kernel optimizations—merge seckill for hotspot row updates, thread pool for resource isolation, DDL improvements including second-level column addition and nonblocking DDL, and flashback for historical data recovery—addressing high concurrency, reliability, agile schema changes, and burst traffic stability.