The SQLite site gives advice to avoid autoincrement because it is slow. The first sentence of this page says:
"The AUTOINCREMENT keyword imposes extra CPU, memory, disk space, and disk I/O overhead and should be avoided if not strictly needed. It is usually not needed."
https://www.sqlite.org/autoinc.html
Since HashBackup (I'm the author) uses autoincrement on a few tables, I thought it would be a good idea to find out about its performance.
I ran 3 tests, all inserting 1M rows into a table with Python.
Test 1: insert using autoincrement. Time: 2.36s, 25% slower than test 2
Test 2: insert using an increasing integer supplied on the insert. Time: 1.89s, fastest
Test 3: insert using a null value - the recommended way. Time: 2.73s, 44% slower than test 2
The SQlite autoincrement page says:
"But if your application does not need these properties [of autoincrement], you should probably stay with the default behavior since the use of AUTOINCREMENT requires additional work to be done as each row is inserted and thus causes INSERTs to run a little slower."
What is surprising is that it doesn't spell out that inserts with no primary key specified run even slower than autoincrement inserts.
So I feel better knowing autoincrement is not so bad, no primary key specified is worse, but I could get a little speed-up specifying the key myself.