Fix DataGrip Run Configuration – Query Output Not Showing
In this tutorial, you'll learn about Fix DataGrip Run Configuration. We cover key concepts, practical examples, and best practices.
You execute a query in DataGrip using the Run button (green triangle) or Ctrl+Enter. The spinner appears, the query "finishes", but the Output tab is empty — or shows only Process finished with exit code 0 with no result rows.
Wrong ❌
You write:
UPDATE users SET status = 'active' WHERE last_login > '2024-01-01';
Click Run — output says:
Process finished with exit code 0
No indication of how many rows were updated. You try SELECT — same thing, empty output.
You check the Console tab:
Connected to mydb@localhost (user: root)
But no result set.
Right ✅
Check the run configuration:
- Look at the toolbar — next to the Run button is a dropdown showing the current Run Configuration (e.g.
<default>or a named config) - If it says Query Console (or similar), click it → Edit Configurations
- Ensure:
- Target data source: correct
- Execution target:
Query(notScriptorSQL Files) - Output to console: ☑
- Show query results in console: ☑
Manual fix — create a proper run config:
- From the Run menu → Edit Configurations →
+→ Database Query - Set:
- Name:
My Query - Data source:
mydb@localhost - Query: paste your SQL
- Execution:
Execute(notExplain) - Result set: ☑ Show results
- Name:
- Click OK → Run (
Shift+F10)
Output now shows:
id name email status
1 Alice alice@example.com active
2 Bob bob@example.com active
2 rows updated (or returned) in 12 ms
For DML (UPDATE/INSERT/DELETE):
UPDATE users SET status = 'active' WHERE last_login > '2024-01-01';
Run it via the same config. DataGrip now displays:
Affected rows: 148
Execution time: 23 ms
Root Cause
DataGrip creates a Query Console by default, which buffers output to the console but may suppress result tables if the "Show query results" option is unchecked. Additionally, DML statements default to "process finished" mode without row counts unless the run configuration is set to "Show results".
Prevention
- Set the default run configuration in Settings → Tools → Database → Query Execution → ☑ Show result set and ☑ Show row count for DML.
- Use
Ctrl+Shift+F9(Execute as Script) for multiple statements — it shows each result in a separate tab. - Save named run configurations for frequently run maintenance queries.
Common Mistakes with run configuration
- Misunderstanding that
Stringis[Char]with poor performance for large text operations - Using
foldlinstead offoldl'causing stack overflow on large lists - Forgetting
deriving (Show, Eq)on custom data types needed for debugging
These mistakes appear frequently in real-world DATAGRIP code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.
Practice Exercise
Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.
This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.
FAQ
Run configurations are covered in depth in the DodaTech DataGrip Workflows course.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro