Starburst Enterprise query editor overview #
The query editor offers a full environment to write and execute SQL statements. From it you can access all catalogs in the cluster currently available to your user.
Access the query editor at any time by clicking Query then Query editor on the left-hand menu of the Web UI. If the left menu is not currently visible, click the ☰ button to restore it.
This topic provides a general overview of query editor features. For more information, refer to the query editor page.
Explorer pane #
Use the explorer pane on the left to access the available catalogs.
The explorer pane shows an expandable, hierarchical diagram with the following symbols:
|columns||two-column table symbol|
To expand an element, click its > expanded arrow. To collapse an element, click its v collapsed arrow.
Click a catalog to collapse all schemas under it, and click a schema to collapse its table list.
You can also click or hover over the name of a table in the explorer to show the full path of the table.
Vertical ellipsis menus #
The explorer displays a vertical ellipsis menu (︙) on the right of an object’s name when you select or hover over its name. The menu options apply only to the current object.
The following table shows the menu options provided by the vertical ellipsis menus for the explorer objects.
As shown in the following table, when the explorer menu options return a path, they wrap each path element in quotes. This takes into account possible spaces and special characters in those element names that may be supported by the current catalog.
For example: “catalog”.”schema”.”tablename”
|View||Same options as for a table, with the word
Editor pane #
Use the editor pane to type your SQL query of interest, then press the ▶ Run button to execute your query. You can also press Ctrl+Enter (⌘+Enter on Mac) to invoke the currently visible Run button.
Run options #
There are two variations of the Run button, with the last variation you used showing for all tabs. Use the drop-down arrow in the current Run button to select between the two Run options, which are:
▶ Run (limit 1000): This default option retrieves up to 1000 rows of the query’s result set and places it in the results pane. Result sets longer than 1000 rows are truncated as if
LIMIT 1000was appended to the query. You can use the Download link at the top of the results pane to download a CSV file of this truncated result set as long as it is still visible in the results pane.
▶ Run and download: This option retrieves a query’s entire result set and streams it in CSV format to a file in the current user’s default downloads directory. The name of the file is browser-dependent. Chrome prompts for a filename; Firefox and Safari write to a file named
results.csv, appending a digit or a timestamp if the target filename exists. While the download proceeds, a few rows of sample results appear in the results pane. Use this option when you expect a large result set from a query.
You can have multiple SQL statements in a tab. In this case, the Run button acts on the statement that contains the cursor, as long as the statement is closed with a semicolon. A statement with a missing semicolon prevents running that statement and all statements below it in the same tab.
As an alternative, you can execute one statement among several in a tab by selecting that statement before pressing the Run button. You can also select a valid portion of a long SQL statement to execute that portion. When text is selected, the Run button options change into:
- ▶ Run selected (limit 1000)
- ▶ Run and download selected
Tab completion #
The query editor anticipates SQL commands and most function names as you type,
and presents a dialog that suggests several ways to complete the command or
function you started. Select an option and press the
Tab key to accept one of
the options, or keep typing to close the dialog.
Separate query editor tabs #
Organize your queries into separate tabs. For example, with a long-running query active in one tab, use the + button to open another tab for different queries. Rename a tab by double-clicking the tab name. Tab contents and tab names persist across login sessions until the tab is closed.
You can also save tabs to be accessed later, using Saved queries on the left-hand menu of the Web UI. For more information, see the query editor reference documentation.
Default location drop-downs #
The right hand corner above the editor pane contains drop-down selectors that
let you specify a default catalog and schema for those
queries. Making these selections is analogous to using the
USE command in
a SQL client session.
Conversely, if you specify an actual
USE catalog.schema statement as an editor
command, the specified catalog and schema display as current selections in these
To the right of the three default location drop-downs is a vertical ellipsis ︙ menu button with the following options:
- Copy: to copy the current editor selection to the clipboard.
- Prettify: to format the selected query to add spaces, tabs, and newlines where needed.
- Command palette: which opens a dialog from which you can select editing commands to run at the current cursor location or run on the current editor selection. With the cursor in the editor pane, you can also press F1 to open the command palette. Press Esc to close the palette.
Results pane #
The results pane below the editor displays the query processing progress and results. Typically one or more rows and columns are returned by a query.
Select the border between the editor and results panes to drag the results pane up or down.
Above the results table on the left, the status bar displays current query processing statistics:
- Status: displays progress while the query is processed, and final status when complete.
- Avg. read speed: from all sources, in rows per second.
- Elapsed time: in seconds since query processing started.
- Rows: the number of rows returned.
While a query is running, a progress estimate for that query is shown. If your result set is very wide, or is greater than 1000 rows, it is truncated.
On the right are three active links:
Query details: opens the details page for the most recently run query.
Web UI: opens the Trino web UI to see information about recently run queries.
Download: if results are shown from the last query, initiates download of those results as a CSV file. Results are not stored, and are only available until a new query is run or your page is closed or refreshed, whichever comes first.
See our reference documentation for more in-depth information about the query editor in Starburst Enterprise.
Is the information on this page helpful?
- Starburst Enterprise query editor overview
Is the information on this page helpful?