Documentation

Query Editor

The toolbar reads Query Console: a Monaco SQL editor (the one inside VS Code) with Ask AI, Clear, Run and Explain. Results appear below with the row count, the execution time and a CSV export of the rows shown.

Editor Features

Monaco Editor

SQL syntax highlighting and schema aware autocomplete. The editor panel is dark in both the light and the dark theme.

Press Ctrl+Space for table names, column names with data types, SQL keywords and functions. Type table. to list its columns.

Runs the Whole Editor

Ctrl+Enter runs the whole editor content; there is no run selection. With several statements separated by semicolons, all of them run and the results panel shows the last result. Replace the content for the next query: the previous one stays in History.

JSON, JSONB and array values show as JSON text in the results (since 1.3.0).

Query History

Every query that runs successfully is saved with a timestamp. Statements from the Structure dialog and agent calls (with a robot badge and the token's name) land in the same list. Click an entry to load it, or use Save Query and Copy SQL.

Keeps the last 1,000 entries across all connections; the History tab shows the current connection, filterable by success, error or agent runs.

Saved Queries

Save SQL you run often with a name, a description and tags in the Saved tab next to History.

Per connection. How saved queries work.

EXPLAIN Visualizer

Click Explain next to Run (default shortcut Ctrl+Shift+Enter) to see the plan as a tree. Nodes are colored by their share of the execution time; Show details opens buffer stats and row estimates.

  • Notices flag a sequential scan returning over 10,000 rows, a MySQL full table scan over 10,000 estimated rows, a sort that spilled to disk, and row estimates off by more than 10x. Each comes with a suggested CREATE INDEX, work_mem or ANALYZE statement and an Insert button that puts it into the editor.
  • Works on all six engines. SQLite shows the plan without cost or timing.
  • On PostgreSQL, TimescaleDB and CockroachDB, EXPLAIN ANALYZE runs a SELECT or WITH query for real to measure it.
https://db.your-company.com
QueryGlow EXPLAIN ANALYZE plan tree with a sequential scan notice and a suggested CREATE INDEX statement with an Insert button

SQL Autocomplete

Completions that know your schema: tables, columns with data types, SQL keywords and functions, depending on where the cursor is.

Dot notation

Type a table name followed by a dot to see its columns with their data types.

customers. → id, email, plan, created_at...

Context aware

After FROM, JOIN, INTO or UPDATE you get tables; after SELECT, WHERE, ON or ORDER BY you get columns and tables.

FROM → tables | SELECT → columns + tables

Keywords & functions

60 SQL keywords and 40 functions with auto-parentheses. The lists are the same for every engine.

COU → COUNT() with the cursor inside

Schema refresh

After a CREATE, ALTER or DROP in the editor or a change in the Structure dialog, the schema reloads.

New tables appear right after the statement runs
https://db.your-company.com
QueryGlow Query Editor with customers. typed and the autocomplete list showing the customers columns with their types

Note: Autocomplete covers the first 200 tables of a connection. On PostgreSQL the column lookup covers the public schema.

Safe Mode (Default: On)

The Query Editor has three guards against accidents.

Auto LIMIT

A read without LIMIT gets LIMIT 1000. Your own LIMIT is respected up to 50,000 rows.

Blocked by default

DROP TABLE, TRUNCATE, dropping indexes, views, materialized views, sequences and schemas, and DELETE or UPDATE without WHERE.

Asks on production

On a production connection the editor shows the statement and asks before any write. Details

A blocked statement answers with Blocked: Destructive operations (DROP, TRUNCATE, DELETE/UPDATE without WHERE) are disabled. Set QUERYGLOW_ALLOW_DESTRUCTIVE=true in .env for Power Mode and apply it with:

docker compose -f docker-compose.production.yml up -d --force-recreate queryglow

See Environment Variables.

Always Blocked (Cannot Be Enabled)

These are blocked in Safe Mode and in Power Mode, whatever QUERYGLOW_ALLOW_DESTRUCTIVE says:

DROP DATABASESHUTDOWNINTO OUTFILEINTO DUMPFILELOAD_FILELOAD DATAxp_cmdshellCOPY TO/FROM PROGRAM

Comments and string literals are masked before the checks run, per statement, so keywords inside them neither trigger nor hide a block. The check reads the SQL text, so it cannot see statements built dynamically inside strings (PREPARE/EXECUTE, DO blocks). Limit what the database user is allowed to do if you need a hard guarantee.

Ask AI

Click Ask AI, pick OpenAI (GPT), Anthropic (Claude) or Google (Gemini), type what you need and click Generate SQL. The SQL for your schema and your database's dialect goes into the editor; review it and run it yourself.

  • Ask AI sends your database type, table and column names with their types, and your prompt. Never rows.
  • Your own OpenAI, Anthropic or Google key, entered in the app (stored encrypted on your server) or set in .env. The provider bills you directly; QueryGlow adds nothing.
  • In standalone mode nginx limits Ask AI to 30 requests per minute per IP.
  • The public demo has AI switched off.
How Ask AI works: keys, models and exactly what is sent

Keyboard Shortcuts

ShortcutActionSetting
Ctrl+EnterRun query (the whole editor content)Default, configurable
Ctrl+Shift+EnterExplain queryDefault, configurable
Not setAsk AIAssign one in Preferences
Not setSave query (opens the saved queries panel with the editor content)Assign one in Preferences
Ctrl+SpaceAutocomplete (tables, columns, keywords, functions)Fixed

Change them in Preferences: click a shortcut, press the keys; Backspace clears it. A combination the browser, the editor or the operating system uses is refused, and so is one already taken by another action. Ctrl stands for Cmd on a Mac. The shortcuts apply in the Query Editor only.