Not All Databases/Schemas Are Displayed by Default. Why?

There is one thing which makes DataGrip different from many other database tools: DataGrip doesn’t show all schemas and databases by default in the database explorer. In this post we’ll briefly describe why it’s designed like this and what you can do if this doesn’t suit your workflow.

The most important thing about DataGrip is that the essence of its work concerns database introspection. Introspection is the process where DataGrip loads the metadata for all the database objects and then uses this metadata for coding assistance and navigation.

Why is DataGrip designed in such a unique way?

As mentioned above, DataGrip’s core features are reliable and fast because it has the metadata for all the schemas.

Completion: Our users love how quickly the auto-completion pop-up gives them variants. This is possible because DataGrip has the schema model and can iterate through it very quickly. 

Code analysis: DataGrip understands your queries and highlights all actual and potential problems. This is possible due to SQL syntax parsing and the help of the schema metadata, as the tool already knows the types of used objects, their nullability, etc.   

Navigation: DataGrip indexes all of the source codes loaded into a single model. This makes it possible to detect, for example, the usages of tables in views and stored procedures. You can also easily search for occurrences of text in all of the database’s source codes.

Search: The Search Everywhere (Double Shift) functionality helps you find database objects in seconds regardless of how many data sources and schemas you have. It doesn’t connect to the database to get the objects based on your search string. Instead it uses the internal index.   

By default, all schemas shown in the database explorer are introspected. So, you need to choose which schemas should be displayed and introspected. You can do this in the Schemas tab of the data source properties:

Or via the tiny button near the data source name in the database explorer:

In general, it’s logical that you want to see and introspect only the schemas you are working with. Behind the aspect of introspection, it’s convenient to see only what you need. Many databases have tons of schemas, but only a few of them may be needed at any one time. Those who work with these databases find this feature very useful :)

The most valuable thing is that we don’t introspect the schemas you don’t need. This saves you time and disk space. Again, we don’t know how big your schemas are and how many databases you have – we prefer not to make any assumptions.

Anyway, if you do want all of your database schemas to be introspected, just tick the corresponding checkbox:

In cases where the data source has schemas inside databases, the checkbox All Schemas should be manually ticked as well.

If you always want to see all databases and schemas, we have another handy setting: Show all namespaces. If this option is turned on, all databases and schemas will be displayed in the database explorer, but not introspected. Should you wish to introspect one of them, select it and click the Refresh button.

We hope this post clarifies the situation and provides you with the necessary workarounds.

The DataGrip team

image description