A SQLite key uses AUTOINCREMENT, which costs on every insert

tx0/sql:sqlite-autoincrementstrictwarningperformance/algorithmicdepth fastperformance

What it finds

SQLite's AUTOINCREMENT keeps a table of the largest key ever used, which costs on every insert; an INTEGER PRIMARY KEY already gets new keys automatically. The SQLite documentation advises against it unless keys must never be reused.

From the rule's source, sqlite_autoincrement.rs.

Turn it on, off or suppress it

The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/sql:sqlite-autoincrement" = "warning"

To keep one finding, suppress it with a reason: tx0 suppress ID --reason "..." writes the comment for it.

tx0 explain tx0/sql:sqlite-autoincrement shows the same in the terminal. Found a false positive? Report it.