Documentation

Saved Queries

Keep the SQL you run every week. A saved query has a name, an optional description and tags, and belongs to one connection. Everyone who uses your install sees the same saved queries.

Saving a Query

  1. Write your SQL in the Query Editor.
  2. Open the Saved tab next to History and click Save Current.
  3. Enter a Name (e.g. Monthly Revenue).
  4. (Optional) Add a Description explaining what the query does.
  5. (Optional) Add Tags, comma separated, like finance, report, daily.
  6. Click Save. The query now appears in the Saved tab.

Two other ways in: click Save Query on an entry in the History tab, or assign a Save query shortcut in Preferences. It opens the saved queries panel with the editor content.

Organization

Saved queries are organized per connection. Each database connection has its own list, so your PostgreSQL reports do not mix with your MySQL scripts.

Example: a query saved while connected to "Production API" only appears when that connection is open.

Managing Saved Queries

Run a saved query

Click the query name in the Saved tab to load it into the editor, then press the Run query shortcut (Ctrl+Enter by default).

Edit or delete

Use the pencil icon next to a saved query to edit its name, description or tags, and the trash icon to delete it.

Storage & Persistence

Saved queries are stored in a JSON file inside the data directory:

/app/data/saved-queries.json

The file lives in the queryglow-data Docker volume, so your queries survive container restarts and updates. Since 1.3.0 it is written atomically, one writer at a time, and a damaged file is reported as an error instead of being overwritten by the next save.

Backups and Copies

Run ./queryglow backup in your QueryGlow directory. It copies .env, the app data (saved queries, connections, history) and, in standalone mode, the nginx files to backups/<timestamp>/. Every ./queryglow update makes one first.

./queryglow restore backups/<timestamp> puts the app data of that snapshot back, after a confirmation. Everything saved since then is lost. More on the queryglow command.

To copy the file out, for example to another install:

docker cp queryglow:/app/data/saved-queries.json .

Each saved query stays tied to the id of its connection. Do not bind mount the data directory into your QueryGlow checkout or commit it: ./queryglow update stops when tracked files have local changes.