Query Tool

Query execution

The query tool enables execution of arbitrary SQL queries against the PostgreSQL database. The target database can be changed using the combobox in the toolbar. To execute, mark the query (or nothing to execute all) and press F5 or the execute toolbar button.

Selecting the database

All connectable databases are listed in the database combobox, located on the toolbar. When selecting a different database, all further queries will be executed against that new selection, using the known user/password credentials. When selecting the last entry named "Connect...", you can select a different user to run the queries using different data access rights.

Analyze

To analyze the query plan instead of executing the query, press F6 or the explain toolbar button.

Snippets

If the server is instrumented properly, the query tool can store sql query snippets in a user specific table in the database. This makes your favourite queries available whenever you connect to the server using Admin4, even when working on different workstations. Mark the text, add to snippets, replace the text (you can restore the previous version also if you accidentially hit the wrong button), organize them using the snippet tree.