Manage queries in PG Studio
PG Studio lets you save useful SQL and revisit recently executed statements, so you can continue analysis without rewriting queries.
Save queries
Save a query so you can open and run it again later. Saved queries are user-specific. Other users in the same Aiven for PostgreSQL service can't see your saved queries.
To save a query:
- In the SQL editor, write or generate your query.
- Run the query and verify the result.
- Click Save.
PG Studio saves the query using the current tab name. The query appears in Saved queries.
Access saved queries and query history
Saved queries shows both your explicitly saved queries and your recent query history, so you can return to any previous work.
To open a saved query or a recent query:
- In the SQL editor, click Saved queries.
- Select a query from the list to load it into the editor.
- Click Run to execute the query.
Rename saved queries
To rename a saved query:
- Click Saved queries.
- Select a query from the list.
- Double-click the query tab name, enter a new name, and press
Enter.
Delete saved queries
To delete a saved query:
- Click Saved queries.
- Select a query from the list.
- Click Delete to remove the query from your saved list.
Deleting a query removes it only from your saved queries list in the editor. It does not delete any database objects created earlier by running SQL in your database.