Postgresql – How to speed up PgAdmin III Queries

pgadminpostgresql

I've been noticing that PgAdmin III isn't as responsive as I expected it to be.

For instance a query to select * ... from a table containing 20,397 rows takes 19.531 seconds in PgAdmin III and 7.383 seconds in DbVisualizer 9.0.7. I initially thought this was a coincidence, but it has been consistent across all queries run.

As such it appears that PgAdmin III takes approximately twice as long to query my database over DbVisualizer. So how can I speed up PgAdmin III Queries?

I am using Heroku Postgres 9.1.9 on the Crane package and PgAdmin 1.16.0.

–EDIT–

I upgraded PgAdmin to version 1.16.1 and query time is 19.038 seconds, so no change with software revision.

Best Answer

It looks like you see a difference between the clients you use.

In my experience the different PostgreSQL clients need very different times for displaying the data they got from the server. Far the fastest was psql and then pgAdminIII, EMS SQL Manager and phppgadmin in who-remembers-what order.

When tried with commands which return no or few rows, the difference is usually negligible or at least very small. Furthermore, you should see the same actual time consumed (with the usual small differences) when you issue an EXPLAIN ANALYZE ... command instead of the actual query which returns the data much slower in one client than the other.