Size of types.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Wed, 23 Jan 2019 20:39:31 +0200
changeset 2343 984ccb104a6e
parent 2342 fb128fcaf50a
child 2344 8370ecc93eec
Size of types.
postgres.rst
--- a/postgres.rst	Thu Jan 10 14:13:45 2019 +0200
+++ b/postgres.rst	Wed Jan 23 20:39:31 2019 +0200
@@ -289,6 +289,15 @@
   LEFT JOIN pg_class t ON t.reltoastrelid = p.oid
   ORDER BY p.relpages DESC;
 
+Size of types::
+
+  SELECT pg_column_size(5::smallint);
+  SELECT pg_column_size(5::int);
+  SELECT pg_column_size(5::bigint);
+
+https://wiki.postgresql.org/wiki/Disk_Usage
+   Finding the size of various object in your database.
+
 MVCC and transaction id
 =======================