Skip to main content

Execute Query View

Execute Query The Execute Query View is divided into three main areas: the instance selector at the top, the SQL editor in the middle, and the results panel below.

Instance Selector

At the top of the screen, select one or more database instances to target. The query will be executed against all selected instances simultaneously, with results returned in separate tabs per instance. When one or more PostgreSQL instances are selected, a Connected to database field appears. This field must be filled before the Execute button becomes active.

SQL Editor

Type or paste your SQL query directly into the editor. The editor supports multi-line queries.
  • Click Execute to run the full query, or use Cmd+Enter (Mac) / Ctrl+Enter (Windows/Linux) as a keyboard shortcut.
  • When text is selected in the editor, the Execute button changes to Run Selection, allowing you to run only the highlighted portion.
  • Click Cancel to stop a running query at any time.

Templates

Query Templates Below the SQL editor, a list of commonly used query templates is displayed. Selecting a template loads its SQL into the editor, ready to run or modify. Templates cover tasks such as:
  • Schema Drift — Compares column names and ordinal positions across selected instances to detect schema inconsistencies between replicas or environments.
  • View User Privileges — Retrieves all privileges granted to a specified user (e.g., SHOW GRANTS FOR admin), useful for access control audits.
  • Poor Index Usage — Identifies queries where more rows are examined than necessary, highlighting candidates for index improvements.
  • Top 10 Time-Consuming Queries — Calculates the percentage of total execution time consumed by each query, sorted by total wait time. Result columns include Percentage, Total, Calls, Mean, and SQL Digest Text.
  • Full Table Scan — Detects queries that scan entire tables without using indexes. Result columns include SUM_ROWS_EXAMINED, SUM_ROWS_SENT, DIGEST_TEXT, and a RECOMMENDATION column with optimization advice.

Save As Template

Save As Template After writing a query, click Save As Template to save it for future reuse. Saved templates appear in the templates list and can be modified or deleted at any time.

Results Panel

Query results are displayed in a tabbed panel below the editor — one tab per selected database instance. If no LIMIT clause is included in your query, a default limit of 1,000 rows is applied automatically.