How to create indexes with sqlite-utils

This commit is contained in:
Simon Willison 2021-12-16 10:03:10 -08:00 committed by GitHub
commit 40e5b0a5b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -133,6 +133,10 @@ The performance of facets can be greatly improved by adding indexes on the colum
Enter ".help" for usage hints.
sqlite> CREATE INDEX Food_Trucks_state ON Food_Trucks("state");
Or using the `sqlite-utils <https://sqlite-utils.datasette.io/en/stable/cli.html#creating-indexes>`__ command-line utility::
$ sqlite-utils create-index mydatabase.db Food_Trucks state
.. _facet_by_json_array:
Facet by JSON array