Sorting random BLOB keys boosts SQLite insert speed
A blog post shows that sorting random 20‑byte BLOB primary keys before bulk inserting into SQLite cuts insert time by up to 30%, converting chaotic writes into sequential ones and reducing page splits. The technique uses a fast unsigned compare on the first eight bytes.