Best of MySQLFebruary 2026

  1. 1
    Article
    Avatar of last9Last9·13w

    Database Partitioning: Types, Strategies, and When to Use Each

    Database partitioning splits large tables into smaller physical segments within the same database instance, with the engine automatically routing queries to the correct partition. The three main strategies are range partitioning (ideal for time-series data), list partitioning (for categorical values like region), and hash partitioning (for even distribution). Partition key selection is critical — if queries don't filter on the key, all partitions get scanned, negating any benefit. PostgreSQL supports declarative partitioning since v10 with tools like pg_partman for automation; MySQL has native support with some constraints. Partitioning helps with query performance via partition pruning, faster data deletion (detach vs DELETE), and more manageable VACUUM operations. It does not solve write throughput scaling — that requires sharding. Monitoring should track per-partition row counts, pruning effectiveness via EXPLAIN, and maintenance timing.

  2. 2
    Article
    Avatar of do_communityDigitalOcean Community·13w

    How To Set Up Laravel, Nginx, and MySQL with Docker Compose

    A comprehensive step-by-step guide to containerizing a Laravel application using Docker Compose with Nginx and MySQL. Covers creating a docker-compose.yml with three services (PHP-FPM app, Nginx webserver, MySQL db), writing a custom Dockerfile based on php:8.3-fpm, configuring PHP settings via local.ini, setting up Nginx with FastCGI proxying to PHP-FPM, persisting MySQL data with named volumes, configuring Laravel's .env for container-based DB connections, running Artisan migrations inside containers, and troubleshooting common issues like 502 errors, permission problems, and database connection failures.

  3. 3
    Article
    Avatar of lnLaravel News·15w

    Laravel 12.51.0 Adds afterSending Callbacks, Validator whenFails, and MySQL Timeout

    Laravel 12.51.0 introduces notification afterSending callbacks for post-send logic, fluent whenFails and whenPasses validator methods for non-HTTP contexts, and a MySQL-specific query timeout method. The release adds closure support in firstOrCreate and createOrFirst for lazy evaluation of expensive operations, a BatchCancelled event for monitoring batch job cancellations, and the ability to use Eloquent builders directly as subqueries in updates. Additional improvements include a withoutHeader response method, enhanced batch testing assertions, cache isolation for parallel tests, and numerous bug fixes across database operations, string helpers, queue middleware, and framework internals.