Disable Object Explorer Cache

已回答

Database: PostgreSQL

We're constantly updating object definitions and the SQL Generator is sometimes misleading if I don't hit a refresh first, which takes some time.

Is there a way to invalidate cache and make DG always ask the server on the object explorer? Similar to what SSMS or DBForge do.

Thanks a lot.

Jairo

0
Hi Jairo,

If you have the auto synch turned on, it'll automatically introspect the changes made to an object / object. Do you have this option activated for your data source? Am I correct that your database is MSSQL and you're facing the issue with having not actual state for every single object? Please also specify your current IDE version
0

HI Aleksandr,

Yes, I have it turned on. I'm on PostgreSQL and my DG version is 2024.3.5 DB-243.24978.79 February 18, 2025

Here's a demo of what I'm experiencing https://youtu.be/BmIo-2vRxV8. It'd be nice for the SQL Generator to not cache definitions and just ask the server.

Thanks,

Jairo

 

0
At the moment, you need to refresh the schema to synch the objects with the server. If speaking of routines (functions, procedure, triggers), you can refresh its latest state by opening such object in the object editor and hitting refresh

When you refresh an object manually, it may consume a significant amount of time based on the number of objects we need to retrieve. To improve the synch performance, we are working on implementing fragmental introspection, which will reduce the time to synch the changes from the server.  

https://youtrack.jetbrains.com/issue/DBE-21240/Support-fragment-Introspection-for-PostgreSQL

Speaking of the video, I think you were to mention a different behavior related to the consoles and how they are reflected when opened and shown in Services tree. Please clarify
0

Hi Aleksandr, fragment introspection would be nice to have in the DataGrip, thanks for sharing the ticket.

About the video, my bad I shared the wrong one, just deleted it.

Here's the right one: https://youtu.be/jzOEXW4T8hE

It'd be super nice to have an option for DataGrip to just ask the database when retrieving a definition instead of just trying to keep the entire object explorer up to date.

Best

0

Hi Jairo,

Thank you for uploading the video. The fragmental introspection should help you in your case:

For some databases, a fragmental introspection is also implemented. It is the ability to retrieve metadata for one single object. This helps in situations where the metadata (usually, the source code) is explicitly requested. For example, if you double-click a view, but the introspection level is low, DataGrip requests the source code at the same moment.

You can follow the mentioned DBE-21240/Support-fragment-Introspection-for-PostgreSQL ticket for updates.

In the meantime, if you’re not using some databases or schemas, you can filter them out in the data source Properties > Schemas tab to reduce the introspection time.

0

请先登录再写评论。