Query history
History answers what did I run just now? It records every query you execute, automatically, without you deciding anything.
For give me the query I run once a quarter, you want Saved queries instead. They are different features on purpose.
What is recorded
Per execution: the query text, its language, the connection, database and collection, when it ran, how long it took, and either the number of rows or the error.
Never the result rows. History with results in it would be a second copy of every data set you have ever looked at, on disk, for a month.
The query text is stored verbatim, because re-running it is the whole feature — a redacted query would open a tab that runs something else. The technical detail recorded beside a failure is redacted, because a driver error can quote a connection string.
Failed runs are recorded too. A list of successes is not what anyone opens history for.
Where it is kept, and for how long
%LOCALAPPDATA%\TableCore\history.json, written atomically beside
workspace.json.
Two limits, both enforced when writing and when reading:
- 30 days' retention — the promise to you.
- A maximum number of entries — what makes the promise cheap. Thirty days is not a size.
Enforcing on read matters as much as on write: an installation nobody opened for a year must not hand back a year of queries the first time it is opened.
Using it
The panel shows the history of the current connection, like the rest of the tab model.
Re-running an entry opens a new tab. You came here from a query you are still looking at, and replacing it would be taking that away.
Two states are kept distinct because they mean different things: no row count is not zero rows, and history is off is not history is empty.
Turning it off
Settings → Privacy → Query history.
Turning it off clears what is already there
Disabling query history deletes the existing entries rather than just pausing new ones. Someone who switches this off is asking for the file to stop existing, not for it to stop growing.
That switch does not touch your saved query library. Turning off the automatic recording of what you ran, and deleting the queries you deliberately saved, are opposite intentions. The library has its own confirmed delete in the same tab, so the option exists and is never a side effect.
Clearing history removes everything, not just the connection you are looking at. You asked for the file to go.
What history will not do
Writing a history entry can never fail your query. You asked for rows, not for bookkeeping.