Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Datagrip - get row count (easily) on queries with more than 500 results

Tags:

datagrip

Is there a way (setting or shortcut) for displaying the total row count of a query that outputs more than 500 rows - that is, without modifying the "Result set page size" value in preferences? I'm looking essentially for the output of select count(*) from (<query>) t in addition to the displayed rows.

like image 215
Kristen Waite Avatar asked Feb 15 '17 13:02

Kristen Waite


People also ask

How do you make a count query faster?

So to make SELECT COUNT(*) queries fast, here's what to do:Get on any version that supports batch mode on columnstore indexes, and put a columnstore index on the table – although your experiences are going to vary dramatically depending on the kind of query you have.

How do you count the number of rows in a query?

To counts all of the rows in a table, whether they contain NULL values or not, use COUNT(*). That form of the COUNT() function basically returns the number of rows in a result set returned by a SELECT statement.

How do I view query results in DataGrip?

Open settings by pressing Ctrl+Alt+S , navigate to Database | Query Execution | Output and Results.


1 Answers

Click on page-size of the result-set

count(*) in DataGrip

like image 111
moscas Avatar answered Sep 23 '22 15:09

moscas