Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

See length (count) of query results in workbench

I just started using MySQL Workbench (6.1). The default limit for queries is 1,000 and that's fine I want to keep that.

But the results from the action output message will therefore always say "1000 rows returned".

Is there a setting to see the number of records that would be returned in the query had their been no limit? For sanity checking query results?

like image 511
Doug Fir Avatar asked Sep 19 '14 14:09

Doug Fir


3 Answers

I know this is late by a few years, but I think you're asking for a way to see total row count in the bottom of the results pane, like in SQL Server. In SQL Server, you would also go in the messages pane and it would say how many rows were returned. I was actually looking for exactly what you were asking for as well, and seems like there is no way to find that. If you have an ID in your table that is just numeric and is in numeric order, you could order by ID desc and look at the biggest number there. That is what I've decided to do.

like image 174
Crazy Cucumber Avatar answered Oct 27 '22 06:10

Crazy Cucumber


The result is not always "1000 rows returned". If there are less records than that you will get the actual count. If you want to know the total number of rows in a table do a select count(*) from table. Alternatively, you can switch off the automatic limit and have all records returned by MySQL Workbench, but that can be time + memory consuming for large tables.

like image 33
Mike Lischke Avatar answered Oct 27 '22 07:10

Mike Lischke


I think removing the row limit will help. By default, MySQL workbench will limit the result set to 1000 rows but you can always disable the limit. Check out https://superuser.com/questions/240291/how-to-remove-1000-row-limit-in-mysql-workbench-queries on how to do that.

like image 29
Percy Avatar answered Oct 27 '22 05:10

Percy