We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 340405d commit a0ff7f1Copy full SHA for a0ff7f1
TODO.md
@@ -878,4 +878,26 @@ order by s.calls_total desc,
878
n.nspname,
879
c.relname
880
limit 100;
881
-```
+```
882
+
883
+# Как получить список всех временных таблиц текущей базы данных и их размер?
884
885
+```sql
886
+SELECT
887
+ n.nspname as SchemaName,
888
+ c.relname as RelationName,
889
+ CASE c.relkind
890
+ WHEN 'r' THEN 'table'
891
+ WHEN 'v' THEN 'view'
892
+ WHEN 'i' THEN 'index'
893
+ WHEN 'S' THEN 'sequence'
894
+ WHEN 's' THEN 'special'
895
+ END as RelationType,
896
+ pg_catalog.pg_get_userbyid(c.relowner) as RelationOwner,
897
+ pg_size_pretty(pg_relation_size(n.nspname ||'.'|| c.relname)) as RelationSize
898
+FROM pg_catalog.pg_class c
899
+LEFT JOIN pg_catalog.pg_namespace AS n ON n.oid = c.relnamespace
900
+WHERE c.relkind IN ('r','s')
901
+AND (n.nspname !~ '^pg_toast' and nspname like 'pg_temp%')
902
+ORDER BY pg_relation_size(n.nspname ||'.'|| c.relname) DESC;
903
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments