For queries in a specific directory adding this index:
create index history_place_command on history(place_id, command_id);
improves perf a lot since then SQLite can first get all relevant place_ids and then check the history for that place instead of going through the whole history and filtering out places.
For me this makes a query like histdb --in $PWD go from 0.4 seconds to being instant.
For queries in a specific directory adding this index:
improves perf a lot since then SQLite can first get all relevant place_ids and then check the history for that place instead of going through the whole history and filtering out places.
For me this makes a query like
histdb --in $PWD
go from 0.4 seconds to being instant.