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.
Introspection is only supported for the databases that have data structure and catalogs.
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:
To open Database Explorer, select from the main menu. Alternatively, press ⌘ 1.
In Database Explorer, click the N of M button next to the data source, database, or schema name.

In the schema selection popup window, select the databases or schemas and press Enter.
In Data Sources and Drivers dialog:
To open the dialog, right-click the data source in Database Explorer and select
Properties. Alternatively, click the
Data Source Properties icon on toolbar.
In the Schemas tab of Data Sources and Drivers dialog, select the databases or schemas.

Note that the Object filter field only defines which objects are visible in Database Explorer and does not affect the introspection scope.
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.

MySQLdata source that has not been introspected.The only introspected
guestdatabase of thePostgreSQLdata source. The database includes four schemas and only thepublicone has been introspected.Database object resolve in a query console: successful for the introspected
guestschema and unsuccessful for thetestsschema 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
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.
In the Options tab, navigate to the Load sources for setting and select the category of schemas.
Apply the changes and close the dialog.

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 additional introspection types and also three introspection levels implemented for some of the supported databases.
For more information about collecting troubleshooting materials to report an introspection issue, refer to the Report introspection issues section.
Introspection types
The introspection type defines which database objects are refreshed during introspection. Some databases allow narrowing this introspection scope down to specific objects. In DataGrip, depending on your database, the following introspection types are available: full introspection, fragment introspection, and incremental introspection.
- Full introspection
The schemas and databases selected for introspection in Database Explorer (schema selector) or in the Data Sources and Drivers dialog (the Schemas tab) are refreshed.
- Incremental introspection
Only the database objects changed in the database after a previous introspection run are refreshed.
- Fragment introspection
Only the database objects selected in Database Explorer are refreshed when you invoke the Refresh action.

When you run a statement in a query console, a smart refresh mechanism is applied. DataGrip analyzes which objects could be potentially modified by this statement, and only that specific set of objects is refreshed.
For some of the supported databases, introspection can be performed by introspection levels.
- Introspection by levels
Introspection levels define the amount of detail retrieved for database objects:
Level 1: Only database object names are loaded.
Level 2: Everything is loaded except the source code of database objects.
Level 3: Everything is loaded.
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 and introspection levels are supported for the following databases:
Database | Incremental introspection | Fragment introspection | Introspection levels |
|---|---|---|---|
Yes | Yes | - | |
Yes | - | - | |
Yes | Yes | Yes | |
Yes | Yes | Yes | |
Yes | Yes | Yes | |
Yes | Yes | Yes | |
Yes | Yes | Yes |