Virtual views

Last modified: 29 October 2024

If you need to monitor the result set of a certain SQL statement that you run regularly, use a virtual view. Virtual view is an IDE virtual object that lets you have the result set available in the Database Explorer. Virtual view is not defined in the database code, its data is not stored in the database, and it cannot be queried with a SELECT statement.

For a virtual view, apart from SELECT queries, you can also use statements like show processlist for MySQL or exec sp_who2 for Microsoft SQL Server.

For example, to have a list of current database connections for a PostgreSQL database, create a virtual view with the following query:

The virtual view with the result set of your query will be available in the Database Explorer as a virtual object.

Virtual view

The SQL statement of virtual view is stored in external-data-<data_source_name>.xml. You can select another name for the XML file and other place to store this file. To change or see the path to the XML document, open data source settings by pressing , click the Options tab and see the Virtual objects and attributes field.

Virtual views ( Virtual view) can be found in the Database Explorer under Database Objects.

Virtual views in Database Explorer