pgAdmin è estremamente lento in qualsiasi operazione remota


10

Eseguo questa query dal mio pgAdmin locale collegandomi in remoto al nostro server di sviluppo:

select * from users order by random() limit 1;

si blocca per 17 secondi e mostra

Total query runtime: 148 ms. 
1 row retrieved.

si blocca anche su qualsiasi operazione: anche facendo clic con il tasto destro su un tavolo.

Successivamente mi collego tramite RDP ed eseguo la stessa query lì nella stessa versione di pgAdmin che visualizza immediatamente i risultati con query time: 32 ms.

Quindi eseguo nuovamente la query dal mio pgAdmin locale:

Total query runtime: 337 ms.
1 row retrieved.

Ho ping 130 ms al server. La velocità di connessione dovrebbe essere più che sufficiente perché posso caricare i file via FTP lì abbastanza velocemente.

La stessa query quando eseguita con il mio psql locale termina in pochi secondi con tempo di connessione incluso.

La stessa query nel mio pgAdmin locale con la mia copia db locale termina immediatamente anche.

La versione di pgAdmin è 1.20.0. Controllato anche sull'ultimo 1.22 - sempre lo stesso.

Cosa posso fare per velocizzare pgAdmin?

Si prega di notare che psql funziona bene, non vedo le stesse latenze lì.

Registro pgAdmin per l'esecuzione della query di 17 secondi:

2016-02-06 16:18:03 INFO   : queueing : select * from users order by random() limit 1;
2016-02-06 16:18:03 QUERY  : Thread executing query (1:server): select * from users order by random() limit 1;
2016-02-06 16:18:03 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:03 QUERY  : Query result: integer
2016-02-06 16:18:03 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:03 QUERY  : Query result: 23
2016-02-06 16:18:03 QUERY  : Scalar query (server): SELECT format_type(oid,259) as typname FROM pg_type WHERE oid = 1043
2016-02-06 16:18:03 QUERY  : Query result: character varying(255)
2016-02-06 16:18:03 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=1043
2016-02-06 16:18:03 QUERY  : Query result: 1043
2016-02-06 16:18:03 QUERY  : Scalar query (server): SELECT format_type(oid,259) as typname FROM pg_type WHERE oid = 1043
2016-02-06 16:18:03 QUERY  : Query result: character varying(255)
2016-02-06 16:18:03 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=1043
2016-02-06 16:18:03 QUERY  : Query result: 1043
2016-02-06 16:18:03 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:04 QUERY  : Query result: integer
2016-02-06 16:18:04 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:04 QUERY  : Query result: 23
2016-02-06 16:18:04 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:04 QUERY  : Query result: integer
2016-02-06 16:18:04 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:04 QUERY  : Query result: 23
2016-02-06 16:18:04 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 1114
2016-02-06 16:18:04 QUERY  : Query result: timestamp without time zone
2016-02-06 16:18:04 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=1114
2016-02-06 16:18:04 QUERY  : Query result: 1114
2016-02-06 16:18:04 QUERY  : Scalar query (server): SELECT format_type(oid,0) as typname FROM pg_type WHERE oid = 1114
2016-02-06 16:18:04 QUERY  : Query result: timestamp(0) without time zone
2016-02-06 16:18:04 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=1114
2016-02-06 16:18:04 QUERY  : Query result: 1114
2016-02-06 16:18:04 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:05 QUERY  : Query result: integer
2016-02-06 16:18:05 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:06 QUERY  : Query result: 23
2016-02-06 16:18:06 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:06 QUERY  : Query result: integer
2016-02-06 16:18:06 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:06 QUERY  : Query result: 23
2016-02-06 16:18:06 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:07 QUERY  : Query result: integer
2016-02-06 16:18:07 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:07 QUERY  : Query result: 23
2016-02-06 16:18:07 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 16
2016-02-06 16:18:07 QUERY  : Query result: boolean
2016-02-06 16:18:07 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=16
2016-02-06 16:18:07 QUERY  : Query result: 16
2016-02-06 16:18:07 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 20
2016-02-06 16:18:07 QUERY  : Query result: bigint
2016-02-06 16:18:07 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=20
2016-02-06 16:18:07 QUERY  : Query result: 20
2016-02-06 16:18:07 QUERY  : Scalar query (server): SELECT format_type(oid,259) as typname FROM pg_type WHERE oid = 1043
2016-02-06 16:18:07 QUERY  : Query result: character varying(255)
2016-02-06 16:18:07 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=1043
2016-02-06 16:18:08 QUERY  : Query result: 1043
2016-02-06 16:18:08 QUERY  : Scalar query (server): SELECT format_type(oid,259) as typname FROM pg_type WHERE oid = 1043
2016-02-06 16:18:08 QUERY  : Query result: character varying(255)
2016-02-06 16:18:08 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=1043
2016-02-06 16:18:08 QUERY  : Query result: 1043
2016-02-06 16:18:08 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 1114
2016-02-06 16:18:08 QUERY  : Query result: timestamp without time zone
2016-02-06 16:18:08 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=1114
2016-02-06 16:18:08 QUERY  : Query result: 1114
2016-02-06 16:18:08 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:08 QUERY  : Query result: integer
2016-02-06 16:18:08 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:08 QUERY  : Query result: 23
2016-02-06 16:18:08 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:09 QUERY  : Query result: integer
2016-02-06 16:18:09 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:09 QUERY  : Query result: 23
2016-02-06 16:18:09 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 16
2016-02-06 16:18:09 QUERY  : Query result: boolean
2016-02-06 16:18:09 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=16
2016-02-06 16:18:09 QUERY  : Query result: 16
2016-02-06 16:18:09 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:09 QUERY  : Query result: integer
2016-02-06 16:18:09 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:09 QUERY  : Query result: 23
2016-02-06 16:18:09 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:09 QUERY  : Query result: integer
2016-02-06 16:18:09 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:09 QUERY  : Query result: 23
2016-02-06 16:18:09 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 16
2016-02-06 16:18:10 QUERY  : Query result: boolean
2016-02-06 16:18:10 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=16
2016-02-06 16:18:10 QUERY  : Query result: 16
2016-02-06 16:18:10 QUERY  : Scalar query (server): SELECT format_type(oid,259) as typname FROM pg_type WHERE oid = 1043
2016-02-06 16:18:10 QUERY  : Query result: character varying(255)
2016-02-06 16:18:10 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=1043
2016-02-06 16:18:10 QUERY  : Query result: 1043
2016-02-06 16:18:11 QUERY  : Scalar query (server): SELECT format_type(oid,259) as typname FROM pg_type WHERE oid = 1043
2016-02-06 16:18:11 QUERY  : Query result: character varying(255)
2016-02-06 16:18:11 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=1043
2016-02-06 16:18:11 QUERY  : Query result: 1043
2016-02-06 16:18:11 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 1114
2016-02-06 16:18:11 QUERY  : Query result: timestamp without time zone
2016-02-06 16:18:11 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=1114
2016-02-06 16:18:12 QUERY  : Query result: 1114
2016-02-06 16:18:12 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 1114
2016-02-06 16:18:12 QUERY  : Query result: timestamp without time zone
2016-02-06 16:18:12 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=1114
2016-02-06 16:18:12 QUERY  : Query result: 1114
2016-02-06 16:18:12 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 1114
2016-02-06 16:18:12 QUERY  : Query result: timestamp without time zone
2016-02-06 16:18:12 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=1114
2016-02-06 16:18:12 QUERY  : Query result: 1114
2016-02-06 16:18:12 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 16
2016-02-06 16:18:12 QUERY  : Query result: boolean
2016-02-06 16:18:12 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=16
2016-02-06 16:18:12 QUERY  : Query result: 16
2016-02-06 16:18:12 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:12 QUERY  : Query result: integer
2016-02-06 16:18:12 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:13 QUERY  : Query result: 23
2016-02-06 16:18:13 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:13 QUERY  : Query result: integer
2016-02-06 16:18:13 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:13 QUERY  : Query result: 23
2016-02-06 16:18:13 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 16
2016-02-06 16:18:13 QUERY  : Query result: boolean
2016-02-06 16:18:13 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=16
2016-02-06 16:18:13 QUERY  : Query result: 16
2016-02-06 16:18:13 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:13 QUERY  : Query result: integer
2016-02-06 16:18:13 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:13 QUERY  : Query result: 23
2016-02-06 16:18:13 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:13 QUERY  : Query result: integer
2016-02-06 16:18:13 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:14 QUERY  : Query result: 23
2016-02-06 16:18:14 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 16
2016-02-06 16:18:14 QUERY  : Query result: boolean
2016-02-06 16:18:14 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=16
2016-02-06 16:18:14 QUERY  : Query result: 16
2016-02-06 16:18:14 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:14 QUERY  : Query result: integer
2016-02-06 16:18:14 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:14 QUERY  : Query result: 23
2016-02-06 16:18:14 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 1114
2016-02-06 16:18:15 QUERY  : Query result: timestamp without time zone
2016-02-06 16:18:15 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=1114
2016-02-06 16:18:15 QUERY  : Query result: 1114
2016-02-06 16:18:15 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:15 QUERY  : Query result: integer
2016-02-06 16:18:15 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:16 QUERY  : Query result: 23
2016-02-06 16:18:16 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:16 QUERY  : Query result: integer
2016-02-06 16:18:16 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:16 QUERY  : Query result: 23
2016-02-06 16:18:16 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:16 QUERY  : Query result: integer
2016-02-06 16:18:16 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:16 QUERY  : Query result: 23
2016-02-06 16:18:16 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:16 QUERY  : Query result: integer
2016-02-06 16:18:16 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:16 QUERY  : Query result: 23
2016-02-06 16:18:16 QUERY  : Scalar query (server): SELECT format_type(oid,259) as typname FROM pg_type WHERE oid = 1043
2016-02-06 16:18:17 QUERY  : Query result: character varying(255)
2016-02-06 16:18:17 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=1043
2016-02-06 16:18:17 QUERY  : Query result: 1043
2016-02-06 16:18:17 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:17 QUERY  : Query result: integer
2016-02-06 16:18:17 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:17 QUERY  : Query result: 23
2016-02-06 16:18:17 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 16
2016-02-06 16:18:17 QUERY  : Query result: boolean
2016-02-06 16:18:17 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=16
2016-02-06 16:18:17 QUERY  : Query result: 16
2016-02-06 16:18:17 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:17 QUERY  : Query result: integer
2016-02-06 16:18:17 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:18 QUERY  : Query result: 23
2016-02-06 16:18:18 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:18 QUERY  : Query result: integer
2016-02-06 16:18:18 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:18 QUERY  : Query result: 23
2016-02-06 16:18:18 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:18 QUERY  : Query result: integer
2016-02-06 16:18:18 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:18 QUERY  : Query result: 23
2016-02-06 16:18:18 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 1114
2016-02-06 16:18:18 QUERY  : Query result: timestamp without time zone
2016-02-06 16:18:18 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=1114
2016-02-06 16:18:18 QUERY  : Query result: 1114
2016-02-06 16:18:18 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 23
2016-02-06 16:18:18 QUERY  : Query result: integer
2016-02-06 16:18:18 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=23
2016-02-06 16:18:19 QUERY  : Query result: 23
2016-02-06 16:18:19 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 16
2016-02-06 16:18:19 QUERY  : Query result: boolean
2016-02-06 16:18:19 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=16
2016-02-06 16:18:19 QUERY  : Query result: 16
2016-02-06 16:18:19 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 16
2016-02-06 16:18:19 QUERY  : Query result: boolean
2016-02-06 16:18:19 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=16
2016-02-06 16:18:19 QUERY  : Query result: 16
2016-02-06 16:18:19 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 1114
2016-02-06 16:18:19 QUERY  : Query result: timestamp without time zone
2016-02-06 16:18:19 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=1114
2016-02-06 16:18:19 QUERY  : Query result: 1114
2016-02-06 16:18:19 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 20
2016-02-06 16:18:19 QUERY  : Query result: bigint
2016-02-06 16:18:19 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=20
2016-02-06 16:18:20 QUERY  : Query result: 20
2016-02-06 16:18:20 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 16
2016-02-06 16:18:20 QUERY  : Query result: boolean
2016-02-06 16:18:20 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=16
2016-02-06 16:18:20 QUERY  : Query result: 16
2016-02-06 16:18:20 QUERY  : Scalar query (server): SELECT format_type(oid,-1) as typname FROM pg_type WHERE oid = 1114
2016-02-06 16:18:20 QUERY  : Query result: timestamp without time zone
2016-02-06 16:18:20 QUERY  : Scalar query (server): SELECT CASE WHEN typbasetype=0 THEN oid else typbasetype END AS basetype
  FROM pg_type WHERE oid=1114
2016-02-06 16:18:20 QUERY  : Query result: 1114

Si blocca sempre?
dezso

@dezso ogni volta che premo F5 per rieseguire la query. è sufficiente per "sempre"?
Vlad

Risposte:


6

L'estratto da pgadmin.logmostra che per ogni colonna di output del risultato, pgadminesegue due query sul catalogo, una per ottenere il nome formattato del tipo dal suo oid, un'altra per ottenere un tipo di base potenziale.

Nel tuo estratto, se sto contando bene, il numero totale di tali query sembra essere 106.

Dal tempo di ping di 148 ms, supponiamo che il tempo minimo per un round-trip al server sia 148 ms. Quindi il tempo minimo impiegato da questa serie di query sarebbe 148 x 106 = 15688 mso15.6 s

D'altra parte, il psqlclient della riga di comando non esegue nessuna di queste query, quindi ci si può aspettare che abbia terminato almeno 15.6secondi prima di pgadmin.

Non sono a conoscenza di alcuna opzione in pgadmin per disabilitarlo, potresti chiedere agli sviluppatori o verificare se hai la versione più recente, ma l'anno scorso è stata posta una domanda simile alla tua sulla mailing list e apparentemente non ha ottenuto risposta:

Rendering di risultati di query lunghi (negli archivi di supporto di pgadmin).

È un dettaglio di implementazione deludente in pgAdmin. Potrebbe ottenere tutti i risultati attraverso una singola query, con l'elenco dei tipi di OID passati in un IN(...)costrutto o in un array. Potrebbe anche memorizzare nella cache questi risultati e nemmeno ripetere le query sugli OID che ha già visto.

Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.