-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcardinality.sql
39 lines (34 loc) · 2.23 KB
/
cardinality.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
------------------------------------------------------------------------------
SELECT 'store_sales' AS "table", COUNT(*),
pg_size_pretty(pg_total_relation_size('store_sales')) AS "size" FROM store_sales;
SELECT 'date_dim' AS "table", COUNT(*),
pg_size_pretty(pg_total_relation_size('date_dim')) AS "size" FROM date_dim;
SELECT 'scd_item' AS "table", COUNT(*),
pg_size_pretty(pg_total_relation_size('scd_item')) AS "size" FROM scd_item;
SELECT 'tdw_item' AS "table", COUNT(*),
pg_size_pretty(pg_total_relation_size('tdw_item')) AS "size" FROM tdw_item;
SELECT 'tdw_item_ls' AS "table", COUNT(*),
pg_size_pretty(pg_total_relation_size('tdw_item_ls')) AS "size" FROM tdw_item_ls;
SELECT 'tdw_item_price' AS "table", COUNT(*),
pg_size_pretty(pg_total_relation_size('tdw_item_price')) AS "size" FROM tdw_item_price;
SELECT 'tdw_brand' AS "table", COUNT(*),
pg_size_pretty(pg_total_relation_size('tdw_brand')) AS "size" FROM tdw_brand;
SELECT 'tdw_category' AS "table", COUNT(*),
pg_size_pretty(pg_total_relation_size('tdw_category')) AS "size" FROM tdw_category;
SELECT 'tdw_item_brand' AS "table", COUNT(*),
pg_size_pretty(pg_total_relation_size('tdw_item_brand')) AS "size" FROM tdw_item_brand;
SELECT 'tdw_item_category' AS "table", COUNT(*),
pg_size_pretty(pg_total_relation_size('tdw_item_category')) AS "size" FROM tdw_item_category;
SELECT 'mobdb_item' AS "table", COUNT(*),
pg_size_pretty(pg_total_relation_size('mobdb_item')) AS "size" FROM mobdb_item;
SELECT 'mobdb_item_price' AS "table", COUNT(*),
pg_size_pretty(pg_total_relation_size('mobdb_item_price')) AS "size" FROM mobdb_item_price;
SELECT 'mobdb_brand' AS "table", COUNT(*),
pg_size_pretty(pg_total_relation_size('mobdb_brand')) AS "size" FROM mobdb_brand;
SELECT 'mobdb_category' AS "table", COUNT(*),
pg_size_pretty(pg_total_relation_size('mobdb_category')) AS "size" FROM mobdb_category;
SELECT 'mobdb_item_brand' AS "table", COUNT(*),
pg_size_pretty(pg_total_relation_size('mobdb_item_brand')) AS "size" FROM mobdb_item_brand;
SELECT 'mobdb_item_category' AS "table", COUNT(*),
pg_size_pretty(pg_total_relation_size('mobdb_item_category')) AS "size" FROM mobdb_item_category;
------------------------------------------------------------------------------