CLI and Python library improvements to help run [ANALYZE](https://www.sqlite.org/lang_analyze.html) after creating indexes or inserting rows, to gain better performance from the SQLite query planner when it runs against indexes.
Three new CLI commands: `create-database`, `analyze` and `bulk`.
More details and examples can be found in the [annotated release notes](https://simonwillison.net/2022/Jan/11/sqlite-utils/).
- New `sqlite-utils create-database` command for creating new empty database files. ([348](https://github.com/simonw/sqlite-utils/issues/348))
- New Python methods for running `ANALYZE` against a database, table or index: `db.analyze()` and `table.analyze()`, see [Optimizing index usage with ANALYZE](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-analyze). ([366](https://github.com/simonw/sqlite-utils/issues/366))
- New [sqlite-utils analyze command](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-analyze) for running `ANALYZE` using the CLI. ([379](https://github.com/simonw/sqlite-utils/issues/379))
- The `create-index`, `insert` and `upsert` commands now have a new `--analyze` option for running `ANALYZE` after the command has completed. ([379](https://github.com/simonw/sqlite-utils/issues/379))
- New [sqlite-utils bulk command](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-bulk) which can import records in the same way as `sqlite-utils insert` (from JSON, CSV or TSV) and use them to bulk execute a parametrized SQL query. ([375](https://github.com/simonw/sqlite-utils/issues/375))
- The CLI tool can now also be run using `python -m sqlite_utils`. ([368](https://github.com/simonw/sqlite-utils/issues/368))
- Using `--fmt` now implies `--table`, so you don't need to pass both options. ([374](https://github.com/simonw/sqlite-utils/issues/374))
- The `--convert` function applied to rows can now modify the row in place. ([371](https://github.com/simonw/sqlite-utils/issues/371))
- The [insert-files command](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-insert-files) supports two new columns: `stem` and `suffix`. ([372](https://github.com/simonw/sqlite-utils/issues/372))
- The `--nl` import option now ignores blank lines in the input. ([376](https://github.com/simonw/sqlite-utils/issues/376))
- Fixed bug where streaming input to the `insert` command with `--batch-size 1` would appear to only commit after several rows had been ingested, due to unnecessary input buffering. ([364](https://github.com/simonw/sqlite-utils/issues/364))