Free Online Developer Tools - ULID, UUID, NanoID, CUID, Snowflake ID, JWT Decoder, Base64, JSON Formatter & More

Tools Menu

DB Insert Benchmark

DB Insert Benchmark - free online developer tool. 100% client-side: your data never leaves your browser.

Database Index Insertion Benchmark

Compare database index writing performance between Sequential IDs (ULIDs / UUID v7) and Random IDs (UUID v4) using IndexedDB.

Time-Sorted Sequential IDs (ULID / UUID v7)

Idle
Total Time:—
Avg Write Speed:—

Unsorted Random IDs (UUID v4)

Idle
Total Time:—
Avg Write Speed:—

Index Insertion Cost Curve

This graph plots transaction latency (ms) for consecutive database insert operations. Notice how random inserts trigger B-Tree page splits, causing latency spikes.

200ms150ms100ms50ms0ms
No data yet. Run the benchmark to plot results.
Sequential (ULID / UUID v7)
Random (UUID v4)

Why is there a performance difference?

Modern databases (such as IndexedDB, SQLite, PostgreSQL, and MySQL) store primary keys inside a B-Tree or B+Tree index structure. When you insert sequential IDs (ULIDs, UUID v7), new records are always appended to the right-most edge of the index, requiring zero re-balancing. In contrast, random IDs (UUID v4) must be inserted at arbitrary nodes, forcing the database to frequently split data pages, move physical sectors, and fragment the index, resulting in slow writes and high storage space overhead.

Help keep this tool free & serverless