Trying to understand how to find and use query history - Big Query and Teradata (DG 2025.2.2)

已回答

I am looking to get an understanding on how to use history in DataGrip similar to how it exists in more basic level query tools.  I am used to being able to see a list of the queries that I have run over time, the dates adn times I ran them, and then the number of results or errors that hapepned, and then access that history.  For example say 4 months ago I ran something but haven't used it in a long time, it was not a query that I saved because it was a quick once and done run but now I need to find it.   Can I search the history by the tables I know I used back then and can find in the history where that query was, select it, and then easily pull it back into my console to run again.

In data grip I am trying to use the Local History but it is more of a coding change history with every modification made and then just the console text but I dont see results or anything like that.  Is this kind of thing possible in Data Grip?  Am I looking in the wrong place?

0

Hi Watkins Glen,

In the current implementation, Query History cannot be used in your scenario. As for the existing options, we currently have database.log files, which can be accessed via Help | Show SQL Logs in Finder. These logs include timestamps, tables, data source names, and the queries themselves. While they are stored in separate files in version-specific folders and are not a full replacement, they can still be used as a workaround.

However, there is a demand for improving this functionality discussed in DBE-5942 ("Globally searchable persistent Query History") and other linked tickets. I've added your description as an internal comment to this ticket. We also have several separate requests related to your case:

  • DBE-8681 - Store date in Query History
  • DBE-2479 - Store results of the queries

You can follow these tickets for updates and upvote them. If you're not familiar with our bug-tracking system, see this article.

0

Those tickets look to be 7, 8 and 10 years old so I am assuming they are not high on the priority list.

 

With the Query History inside of Data Grip itself, is it persistent across all sessions or does it only keep history in memory for a certain amount of time?  Also does it need to be set up?  For example I ran a query with the letters TMP in the query.  I got many results. I opened the "Browse query history window and searched for TMP in the query history and got no results.  When I scroll through the queries though and select them manually I can see the letters TMP in the query itself.  Does the search functionality on the query history only search the left hand panel and not the full query itself?  The left hand panel is just a very small snip of the full query on display.

0

Watkins Glen,

Those tickets look to be 7, 8 and 10 years old so I am assuming they are not high on the priority list.

While this is not planned for the next few months, we do plan to redesign the Query History functionality, possibly even this year.

 

Does the search functionality on the query history only search the left hand panel and not the full query itself?

I'm afraid this is indeed the current limitation. For such cases, searching through Local History may be more helpful. However, please note that Local History is cleared when installing a new version of DataGrip, and it also has a retention period and maximum size, so revisions are not guaranteed to persist.

0

请先登录再写评论。