Database Sharding Explained: When and How to Split Your Data
Database sharding explained: splitting data across servers, shard keys, hash vs range vs directory, cross-shard queries, resharding, Vitess and Citus.
Blog
Installing, tuning, securing and backing up MySQL, MariaDB, PostgreSQL, Redis, MongoDB and more.
Database sharding explained: splitting data across servers, shard keys, hash vs range vs directory, cross-shard queries, resharding, Vitess and Citus.
Compare MySQL and PostgreSQL on features, performance, SQL standards, JSON, replication, tooling and hosting — with clear recommendations by use case.
Compare PostgreSQL and MongoDB: data model, schemas, JSONB vs BSON, queries and joins, transactions, scaling and sharding, operations, licences, use cases.
Back up MySQL and MariaDB with mysqldump: single or all databases, consistent InnoDB dumps, compression, restore, automation with cron and offsite copies.
Manage schema changes safely: migration tools (Flyway, Liquibase, Alembic, Prisma, Laravel), CI deploys, expand and contract, locking pitfalls, rollbacks.
Practical redis-cli usage: connecting with auth and TLS, strings, hashes, lists, sets and sorted sets, scanning keys safely and diagnostics.
Build search with PostgreSQL full-text search: tsvector, tsquery, websearch_to_tsquery, generated columns, GIN indexes, weights, ranking and highlighting.
Set up Redis Sentinel with a master, replicas and three sentinels: configuration, quorum, how failover works, connecting clients, testing, vs Cluster.
Import multi-gigabyte SQL dumps reliably with the mysql client: progress with pv, faster InnoDB imports, big packets and common errors.
Relocate /var/lib/mysql to a larger disk or volume safely: stop the server, copy with rsync, update datadir, AppArmor or SELinux rules, test and clean up.
Store embeddings and run similarity search in PostgreSQL with pgvector: install, vector columns, distance operators, HNSW and IVFFlat indexes, and RAG.
Create MySQL users, grant and revoke privileges, understand user@host, list users and grants, change passwords and apply least privilege for apps.
Work with JSONB in PostgreSQL: json vs jsonb, operators, containment, jsonpath, updating with jsonb_set, GIN and expression indexes, and schema design advice.
Everyday psql usage: connecting, meta-commands for databases, tables and roles, expanded output, timing, scripts, CSV export and a .psqlrc.
Monitor PostgreSQL: connections and locks, slow queries with pg_stat_statements, cache hit ratio, bloat and vacuum, replication lag, disk and alerts.
Set up MySQL 8 source-replica replication with GTIDs: server IDs and binlogs, a replication user, seeding the replica, monitoring and failover.
Create PostgreSQL roles and databases, set passwords, grant privileges on schemas and tables, fix PostgreSQL 15+ public schema permissions and list users.
Use Redis to speed up apps: cache-aside, write-through, TTLs, key design, serialization, invalidation, stampede protection, eviction and framework setup.
Run Meilisearch on a VPS: Docker or binary, master key, adding documents, searchable and filterable attributes, typo tolerance, API keys, HTTPS, backups.
Enable the MySQL or MariaDB slow query log, pick long_query_time, analyse it with mysqldumpslow and pt-query-digest, and fix what you find.
Compare MongoDB and MySQL on data model, schema, queries and joins, transactions, scaling and operations, and when JSON columns are enough.
Why PostgreSQL needs VACUUM, how autovacuum works, finding bloat, tuning autovacuum per table, VACUUM FULL vs pg_repack, wraparound protection.
Enable remote MySQL or MariaDB connections safely: bind-address, user@host accounts, firewall rules for one IP, TLS, SSH tunnels and common errors.
Use DuckDB for fast analytics without a server: query CSV, JSON and Parquet with SQL, analyze Nginx logs, attach PostgreSQL, export results, Python examples.