Skip to content

3.21

Compare
Choose a tag to compare
@simonw simonw released this 11 Jan 02:35
· 299 commits to main since this release

CLI and Python library improvements to help run ANALYZE 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.

  • New sqlite-utils create-database command for creating new empty database files. (#348)
  • New Python methods for running ANALYZE against a database, table or index: db.analyze() and table.analyze(), see Optimizing index usage with ANALYZE. (#366)
  • New sqlite-utils analyze command for running ANALYZE using the CLI. (#379)
  • The create-index, insert and upsert commands now have a new --analyze option for running ANALYZE after the command has completed. (#379)
  • New sqlite-utils bulk command 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)
  • The CLI tool can now also be run using python -m sqlite_utils. (#368)
  • Using --fmt now implies --table, so you don't need to pass both options. (#374)
  • The --convert function applied to rows can now modify the row in place. (#371)
  • The insert-files command supports two new columns: stem and suffix. (#372)
  • The --nl import option now ignores blank lines in the input. (#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)