iz-ahmad/packages/turbo-seeder
OPEN SOURCE · PHP / LARAVEL PACKAGE

Laravel
Turbo Seeder

Seed millions of records in seconds — not minutes. A high-performance database seeder built for production-scale data generation with minimal time and memory.

~20s1M rows
< 200 MBPeak memory
2-4xFaster w/ CSV
$ composer require iz-ahmad/laravel-turbo-seederCopy
artisan — turbo-seeder:run
 php artisan turbo-seeder:run UsersTurboSeeder
→ table users  strategy csv  count 1,000,000

[████████████████████████] 100%

✓ done  inserted 1,000,000 rows
  time 19.4s   mem 124 MB
  rate 51,546 rows/s
01 / THE PROBLEM

Default seeders weren't built for scale.

Seeding 500K-1M+ records for realistic load testing can take 30+ minutes and unbounded memory — slowing every iteration. Turbo Seeder eliminates that bottleneck.

Standard Laravel seeder
30-40 min
to seed 1M rows
  • One query per row via Eloquent
  • Model events fire on every record
  • Memory climbs without bound
  • Blocks CI/CD & slows iterations
Turbo Seeder
~20-60 sec
same 1M rows · ~50/100x faster
  • Raw bulk INSERT — no Eloquent
  • Native CSV import (LOAD DATA / COPY)
  • Memory stays flat — lazy generators
  • CI/CD friendly — fast every run
Scenario · 1M rows
Standard
Turbo Seeder
Simple table
~30 min
~20s
Complex table
~40-50 min
~60s
Via CSV strategy
~10-45s
Peak memory
unbounded
< 50-200 MB
02 / UNDER THE HOOD

How it's so fast.

No Eloquent overhead

Raw SQL only — no model events, no observers, no per-row hydration.

Bulk inserts

Multi-row INSERT statements instead of one query per row.

Native CSV import

LOAD DATA (MySQL) / COPY FROM STDIN (PostgreSQL) for raw throughput.

Smart chunking

Lazy generators keep memory flat, with automatic GC between chunks.

Minimal overhead

FK checks and query logging are disabled automatically during the seed.

Streaming I/O

CSV is piped as a stream and never fully loaded into memory.

03 / GET STARTED

Up and running in three steps.

No config required — sensible, performance-tuned defaults out of the box.

Step 01 · Install
$ composer require iz-ahmad/laravel-turbo-seeder
Step 02 · Scaffold
$ php artisan make:turbo-seeder UserTurboSeeder --table=users --count=1000000
Step 03 · Run
$ php artisan turbo-seeder:run UserTurboSeeder
Want more control? See the data paths & seeding strategies ↓
04 / CHOICES YOU MAKE

Two choices. Any combination.

How you generate rows, and how they're written to the database — pick each independently.

Data generation path
Reuse what you have
fromFactory()

Your existing factory definition, as-is — states work exactly like before.

Faker-backed · best ≤500k rows
Maximum speed
generate()

Faker-free closure powered by TurboData helpers — index-based, O(1) memory.

No Faker · best for 500k+ rows
Seeding strategy
Bulk INSERT
Default

Multi-row INSERT statements. Works everywhere, zero setup required.

~20-60s / 1M rows · 50-200 MB
Native import
useCsvStrategy()

LOAD DATA (MySQL) / COPY FROM STDIN (PostgreSQL) — one method call away.

~10-45s / 1M rows · ~0 MB extra
// Reuse your existing factory — ~100× faster at scale
use IzAhmad\TurboSeeder\Facades\TurboSeeder;

TurboSeeder::fromFactory(User::factory())
    ->count(100_000)
    ->run();

Both paths run through the same engine, and either strategy works with either path — mix and match freely. Explore the docs →

05 / CAPABILITIES

Everything you need — at a glance.

Multi-database

MySQL · PostgreSQL · SQLite

Highly configurable

Chunk size, transactions, retries, FK/unique checks

Relational seeding

Load FK values in one line, zero extra queries

Upsert support

Per-driver conflict resolution

Type formatting

Enums, JSON, dates, arrays — automatic

Progress tracking

Real-time bar with live metrics

Dry run

Validate generation without committing

Laravel 10–13

PHP 8.2+ · CI/CD ready

Ready to seed at scale

Stop waiting on your seeders.

Install it, scaffold a seeder, and seed production-scale data in seconds. Free & open source under MIT.

$ composer require iz-ahmad/laravel-turbo-seederCopy
Made with for the Laravel community← Back to portfolio