Friday, 9 September 2022

Postgresql - List all table rows count in the schema

 SELECT 

        schemaname,

        relname,

        n_live_tup AS EstimatedCount 

FROM pg_stat_user_tables 

ORDER BY n_live_tup 

DESC LIMIT 5;

No comments:

Data Sharing

  1. Create Share CREATE SHARE my_share; 2. Grant privileges to share GRANT USAGE ON DATABASE my_db TO SHARE my_share; GRANT USAGE ...