Skip to content

History and Query Library ​

Some people collect shoes. I collect saved queries.

Query history ​

⌘ Y (from a query tab) or the clock icon in the editor opens every query you have run.

  • Search the text, and switch between This connection and All connections.
  • Show All or only Failures, sorted by Recent or Slowest.
  • Each entry shows whether it worked, how long it took and how many rows it returned.
  • Open query puts it back in the editor; Save as favorite adds it to the library.

Lily keeps the last 300 queries. Settings › Data & queries shows how many are logged and has Clear history.

Query Library ​

Save the query in the editor with the star. Give it a name and, if you like, a description; with AI set up, Lily can write both for you.

⌘ B (from a query tab) opens the library:

  • search by name or text;
  • organize queries in folders (Folder › New folder…);
  • every query is tagged with its engine, and the engine chip filters to the one you are using;
  • double-click, or Open in editor, to use one.

The library is also in Settings › Query library › Favorites, next to your snippets. Saved queries also show up in the command palette.

Query plan history ​

Every time you run Explain, Lily keeps the query and its plan. Open them from the Query plan history icon in the editor, to compare a plan before and after a change. Lily keeps the last 200; Settings › Data & queries has Clear plans.

Everything here lives on your Mac, in ~/Library/Application Support/db.cortex/. It is not synced.

Lily DB is free for personal and commercial use.