How to download CSV without rerunning query
Every time I download a .CSV in Data Grip, the query has to re-run. Is there anyway to prevent this from happening? I've never used a SQL client that had to rerun each query in order to download.
Please sign in to leave a comment.
Hello Andrew,
Can you please describe how do you import the results?
Note that Results tab in the Database Tool Window could be showing only a portion of select (if query results are too big), but when you are exporting the results in a file DataGrip will select all the remaining rows. The portion of the result which is being selected is configured in prefetched size option in File | Settings | Database | Data Views settings.
Does it help?
I have this problem too.
If I have a query that takes some time to construct and run, yes it does only show the first ~500 rows or so.
Then if I click export to csv, it re runs the query (taking the time) and then exports it to file.
When the queries use variables set prior to the main query, it is particularly annoying, as the variables may no longer be set by the time I re run the query.
Generally I find the interface is hard to use and understand the status (executing or not) if you are running long running queries, across different databases.
If you select your query and right-click, you can choose Execute to File
Has anyone found a solution to this? I used to be able to export results easily, but long queries are now re-running upon selecting export results.
+1 have the same issue. How do you download results to file without re-running the query?
Yeah I also have this problem. It makes no sense even the most basic SQL client won't make you double your wait time for a query. I don't want to have to execute every query to a file for this.
I agree - there should be a possibility to set DataGrip to always download the whole results for given data source or for queries run from given file/console, so than when user would like to save results he wouldn't have to rerun query again.
+ 1 Same here, very annoying when I try to execute a complex query, check if that's exactly what I want, then have to wait again for the query to re-run when exporting to CSV file. There should be some how we can export query result much faster!
This is frustrating! Please fix this!
It looks like long running issue https://youtrack.jetbrains.com/issue/DBE-5181/Pre-load-several-pages-of-long-running-queries-in-order-to-avoid . Please, follow and upvote