Saved Queries
Build a personal library of frequently-used SQL scripts. Save queries with names, descriptions, and tags for quick access from the sidebar.
Saving a Query
- Write your SQL in the Query Editor.
- Click the "Save Query" button.
- Enter a Name (e.g., "Monthly Revenue Report").
- (Optional) Add a description explaining what the query does.
- (Optional) Add tags like
finance,report, ordaily. - Click Save. Your query now appears in the Saved Queries sidebar.
Organization
Saved queries are organized per connection. Each database connection has its own query library, so your PostgreSQL reports don't mix with your MySQL scripts.
Example: A query saved while connected to "Production API" will only appear when you're connected to that same connection.
Managing Saved Queries
Run a saved query
Click the query name in the sidebar to load it into the editor. Then press Ctrl+Enter to execute.
Edit or delete
Click the ⋮ menu next to any saved query to edit its name, description, tags, or delete it entirely.
Storage & Persistence
Saved queries are stored in a JSON file inside your data directory:
/app/data/saved-queries.jsonThis file lives in the queryglow-data Docker volume, so your queries survive container restarts and updates.
Backup tip: Include the data/ directory in your server backups to preserve saved queries, connections, and query history.
💡 Pro Tip: Version Control
Since queries are stored in a simple JSON file, you can version control them with Git. This is useful if you want to track changes or share queries across multiple QueryGlow instances.
To enable this, modify your docker-compose.yml to use a bind mount:
volumes:
- ./data:/app/data # Instead of named volumeThen commit data/saved-queries.json to your repository.
Note: This is an advanced workflow. The default named volume works fine for most users.