Query History & Search¶
Every query executed via :TDO, :TDV, :TDM, or :TDMV is recorded to disk:
- Queries:
history_dir/queries/<id>.sql - Result sets:
history_dir/resultsets/<id>.csv
You can limit the number of saved runs via the history_max option.
Browse History (:TDH)¶
Use :TDH to open the interactive history buffer (zero external dependencies).
- Each executed query is listed with its execution ID.
- Press
<CR>on any entry to open the SQL query and its saved result set side-by-side in a split. - Press
qto close the history buffer.
:TDH " open history buffer
Search History (:TDR)¶
Use :TDR to search through previous queries by SQL text.
- Requires ripgrep (
rg) and bat. - Integrates with your configured picker: fzf-lua, snacks.nvim, telescope.nvim, fzf.vim, or the built-in native picker (
vim.ui.select). Seepicker.
:TDR " search query history