Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DataGrip - How to learn any table size in DataGrip?

Tags:

mysql

datagrip

Simple question is that I want to learn table size in DataGrip.Is there any shortcut or a simple way ..

enter image description here

like image 314
user6158055 Avatar asked Jun 04 '16 19:06

user6158055


People also ask

How do I view all tables in DataGrip?

View table data Open the Database Explorer (View | Tool Windows | Database Explorer). In the database tree, navigate to the table that you want to open. Double-click the table.

How do you describe a table in DataGrip?

This tutorial will show you how to view and edit table and column descriptions using DataGrip tool. Firstable, find in toolbar View -> Tool Windows -> Database or press Alt + 1 key combination. Editing column comment is done in the same way. Right click on column name and select Database Tools -> Modify Comment.

How do you check the size of a table in Dbeaver?

If you need to quickly find the right table in a large database, you can sometimes rely on the table size. To display this information, go to Connection view -> Show statistics info.


2 Answers

This query is a solution:

SELECT table_name,
(data_length + index_length) / power(1024, 2) AS tablesize_mb
FROM    information_schema.tables
WHERE   1=1
AND table_name IN ('actor', 'category', 'film', 'film_actor', 'film_category', 'language')
like image 127
user6158055 Avatar answered Oct 17 '22 01:10

user6158055


There is now a quick way to do this from the UI.

  1. Right click the table of interest

  2. Select Quick documentation

  3. Scroll down to rows field

like image 44
softmax55 Avatar answered Oct 17 '22 03:10

softmax55