DataGrip 2025.1 Help

Metadata and introspection

Metadata contains the information about the database objects, structure, database object source code, and so on. DataGrip uses this information to show the objects in Database Explorer, display their DDL, suggest them during completion, and for other coding assistance, navigation, and search features.

In DataGrip, there are two ways of obtaining metadata of your database: minicatalogs and introspection.

Minicatalogs

With the minicatalogs for system schemas, metadata of system schemas is pre-introspected and provided with the IDE itself. They allow writing scripts that use system metadata prior to introspecting system schemas and with no connection to the database.

Introspection

Introspection is a process of loading metadata of a database. When you perform introspection, structural information in the data source is inspected to detect tables, columns, routines, and other database objects with their attributes.

By default, only the schemas and databases selected to be shown in the Database Explorer are introspected.

You can select which schemas and databases will be introspected and shown by either selecting them in the Database Explorer (⌘ 1) , or editing the data source properties in Data Sources and Drivers dialog (Ctrl+Alt+Shift+S) dialog.

Select schemas and databases for introspection

  • In Database Explorer:

    1. To open Database Explorer, select View | Tool Windows | Database Explorer from the main menu. Alternatively, press ⌘ 1.

    2. In Database Explorer, click the N of M button next to the data source, database, or schema name.

      Select schemas or databases in Database Explorer
    3. In the schema selection popup window, select the databases or schemas and press Enter.

  • In Data Sources and Drivers dialog:

    1. To open the dialog, right-click the data source in Database Explorer and select the Properties icon Properties. Alternatively, click the the Settings button Data Source Properties icon on toolbar.

    2. In the Schemas tab of Data Sources and Drivers dialog, select the databases or schemas.

      Select schemas or databases in data source properties
    3. Apply your changes and close the dialog.

Once the necessary databases and schemas are introspected, IDE can resolve the database objects in your scripts to the correct context. The example below demonstrates database object resolve for introspected and not introspected schemas.

Database objects resolve for the introspected and not introspected schemas
  1. MySQL data source that has not been introspected.

  2. The only introspected guest database of the PostgreSQL data source. The database includes four schemas and only the public one has been introspected.

  3. Database object resolve in a query console: successful for the introspected guest schema and unsuccessful for the tests schema that has not been introspected.

For every data source, you can also select the category of schemas that source code of database objects is loaded for.

Load sources of database objects for different schemas

  1. To select schemas for which sources of database objects are loaded, open the Data Sources and Drivers dialog (Ctrl+Alt+Shift+S) and select a data source.

  2. In the Options tab, navigate to the Load sources for setting and select the category of schemas.

  3. Apply the changes and close the dialog.

Select the category of schemas that database object sources are loaded for

Database users might experience a long introspection time if all the objects are being processed, whereas it is usually not required for daily work and coding assistance. To reduce the number of introspected objects, DataGrip has three introspection levels available for a few databases. For more information about the levels, refer to Introspection levels topic.

For more information about collecting troubleshooting materials to report an introspection issue, refer to the Report introspection issues section.

Introspection types

In DataGrip, depending on your database vendor, you can use the following introspection types: full introspection, fragment introspection, and incremental introspection.

Full introspection

The entire database schema is synced and refreshed every time a DDL statement is executed in a query console.

Incremental introspection

With the incremental introspection, the introspector detects objects changed in the database after the previous introspection and loads only these objects.

Fragment introspection

Only the database objects affected by an executed statement are refreshed.

Every time a DDL statement is executed in the query console, DataGrip analyzes it. The IDE determines which objects can be modified by the statement execution and refreshes only those objects.

For example, if a constraint is dropped in a table with drop constraint My_Table_pk, then the table that contained the constraint is refreshed. But if a my_view view depends on a my_table table and the table is modified by a user, then the my_view view is not updated.

By levels

For some databases, a few levels of introspection are supported. These levels allow for different amount of metadata to be loaded from a database.

For more information about introspection levels, refer to the Introspection levels topic.

If no specific introspection type is supported for a database, DataGrip performs full introspection. Specific types of introspection are supported for the following databases:

Database

Incremental

Fragment

By levels

Azure SQL Database

Yes

Yes

-

Greenplum

Yes

-

-

MariaDB

Yes

Yes

Yes

Microsoft SQL Server

Yes

Yes

-

MySQL

Yes

Yes

Yes

Oracle

Yes

Yes

Yes

PostgreSQL

Yes

-

-

Last modified: 07 April 2025