Hi. I'm trying to understand if everything is ok w...
# general
k
Hi. I'm trying to understand if everything is ok with my greptime, I feel like tables grew a bit too much (they should be capped). How do I get table sizes? Tried this from both web UI and psql https://docs.greptime.com/reference/sql/information-schema/tables/ , got errors:
Copy code
echo=> USE INFORMATION_SCHEMA;
--
(0 rows)

echo=> SELECT * FROM tables WHERE table_schema='public' AND table_name='monitor'\G
invalid command \G
Try \? for help.
As I understand this is mysql syntax, for psql tried this but it returns empty results:
Copy code
echo=> SELECT *
FROM information_schema.tables
WHERE table_schema='public'
  AND table_name='monitor';
The data files are as such:
Copy code
echo@echo-greptime:/etc/greptimedb-data$ sudo du -h --max-depth=1 .
12K     ./index_intermediate
2.5M    ./logs
45G     ./data
4.0K    ./tmp
6.4M    ./metadata
2.3G    ./wal
47G     .
n
hello Kostia, first this
\G
is a special extension by mysql cli, so you cannot use it in psql. psql has a similar toggle
\x
but it's a global toggle so you just run
\x
to open/close it. second question, can you just run
SELECT * FROM information_schema.tables
in case that your table is not named as
monitor
k
My bad, didn't notice the table name filter. Thank you!
Is there a way to see table size in MB? I can only see
table_rows
column resembling something close to it
n