@matusp While you're looking into queries, can you provide some numbers about your setup - specifically the row count of your tables
with tbl as (select table_schema, table_name from information_schema.tables where table_name not like 'pg_%' and table_schema != 'information_schema' and table_schema in ('public')) --change 'public' if Metabase appdb is in another schema
select
table_schema
, table_name
, pg_total_relation_size('"'||table_schema||'"."'||table_name||'"') size_total
, pg_relation_size('"'||table_schema||'"."'||table_name||'"') size_tbl
, (xpath('/row/c/text()', query_to_xml(format('select count(*) as c from %I.%I', table_schema, table_name), false, true, '')))[1]::text::bigint count_rows
from tbl
order by 5 desc nulls last;