Vous n'êtes pas identifié(e).
Pages : 1
Bonjour,
la sortie de ma requête est illisible:
postgres=# select client_addr, usename, datname, clock_timestamp() - xact_start as xact_age, clock_timestamp() - query_start as query_age, query from pg_stat_activity order by xact_start, query_start;
client_addr | usename | datname | xact_age | query_age |
query
-------------+----------+----------+-----------------+-----------------+--------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
| postgres | postgres | 00:00:00.021862 | 00:00:00.021875 | select client_addr, usename, datname, clock_timestamp() - xact_start as xact_age, clo
ck_timestamp() - query_start as query_age, query from pg_stat_activity order by xact_start, query_start;
::1 | postgres | postgres | | 23:29:00.912654 | select relname, pg_size_pretty(pg_total_relation_size(relname::regclass)) as full_siz
e, pg_size_pretty(pg_relation_size(relname::regclass)) as table_size, pg_size_pretty(pg_total_relation_size(relname::regclass) - pg_relation_size(relname::reg
class)) as index_size from pg_stat_user_tables order by pg_total_relation_size(relname::regclass) desc limit 10;
| postgres | postgres | | 23:28:47.383302 | select relname, pg_size_pretty(pg_total_relation_size(relname::regclass)) as full_siz
e, pg_size_pretty(pg_relation_size(relname::regclass)) as table_size, pg_size_pretty(pg_total_relation_size(relname::regclass) - pg_relation_size(relname::reg
class)) as index_size from pg_stat_user_tables order by pg_total_relation_size(relname::regclass) desc limit 10;
| postgres | postgres | | 01:32:15.72128 | SELECT n.nspname as "Schema",
+
| | | | | c.relname as "Name"
Peut-on l'améliorer?
D'avance merci.
Dernière modification par big1 (01/06/2018 09:40:35)
Hors ligne
bonjour,
avez-vous essayé \x avant de passer votre requête ?
Cordialement,
Sébastien.
Hors ligne
Le plus simple est d'utiliser la méta-commande \x pour changer la présentation.
Guillaume.
Hors ligne
Bonjour,
En complément, il y a quelques mois Daniel Vérité a publié sur son blog à propos d'un pager pour psql qui semblait prometteur
Dernière modification par jmarsac (01/06/2018 11:22:32)
Hors ligne
Pages : 1