16

pgAdmin 4 GUI for postgreSQL is very slow. It takes too much time to even expand a server tree or a database tree. They each took almost 30 seconds to expand. It also hangs while creating a new database or table. Even after loading it took more than a minute just to create and save a new database. It happens almost every time I load the pgAdmin. Is this problem faced just by me or there's something wrong?

My system specifications: PostgreSQL 12.3, Firefox 77.0, Windows 10 64-bit, 8th Gen Quad Core i5 8250u processor, 8GB RAM and 2GB dedicated graphics memory.

In the picture you can see:

  • The database tree is still loading.
  • The right click menu and create database window got hanged up.

enter image description here

Hanged on clicking save. It took more than a minute to save a new database enter image description here

Mariusz Jamro
  • 30,615
  • 24
  • 120
  • 162
Karthik
  • 175
  • 1
  • 1
  • 11

7 Answers7

23

I had the very same issue, Seems it's related to Windows 10 preferring ipv6 over ipv4.

the following fix worked for me: https://dba.stackexchange.com/questions/201646/


Modify the listen_addresses setting in

the postgresql.conf file usually located under : (unless another data folder specified)

{installation folder}/data/postgresql.conf


to be -> listen_addresses = '127.0.0.1,::1'


The Default value for the listen_addresses is localhost

M. Amer
  • 916
  • 10
  • 12
  • 5
    Awesome! Greatly worked for me!! Upvoted!!! A quick note for future readers: The default is not `localhost`, (as of `v13.3`), but `*`. I've checked this on `Windows` Machine after installing locally. – Santhosh John May 24 '21 at 15:20
  • 2
    @nimpossible Thanks for pointing out the default value. Glad to know the answer helped you. – M. Amer May 25 '21 at 12:02
1

Click the title bar of pgadmin and drag it around(slowly, otherwise other windows will minimize). I don't know how but it works for me, everything will load faster.

salman_sali
  • 181
  • 2
  • 8
1

I had the same problem. It turns out that the PostgreSQL binary path was pointing to $DIR/../runtime:

Screenshot

So I had to manually set the binary path, restart PgAdmin and that's it; everything works as expected.

Screenshot

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
1

pgAdmin 4 is just a frontend for PostgreSQL, there are around 25 front end like this that you can use for Postgre, i personally use DBeaver for PostgreSQL, i also had so many issues with pgAdmin 4, its super slow and will give you issues if you working with nodejs.

Install DBeaver and go to "NEw Database Connection> and connect with PostgreSQL

Thank you

Tayyab
  • 11
  • 1
1

FILE >> PREFERENCES >> BINARY PATHS :

I moved the '$DIR/runtime' path from Pg14 to Pg13.

GUI is much faster now.

Vishal
  • 11
  • 3
0

I also had the same issue when I installed pgAdmin 4. Server tree loading and query execution took long time than the older versions took.

I tried to change many things but the thing that worked was changing the binary path. Actually I had added the binary path of postgresql bin folder i.e. C:\Program Files\PostgreSQL\14\bin to PostgreSQL 14. I changed the that and added the path to PostgreSQL 13.

Open the preferences dialog box from 'File' in the menu bar. Then go to binary paths tab and it should look similar to this image. enter image description here

Actually PostgresSQL 14 is the latest one and it should work but I also don't know why it is not working. Maybe in the future developers will solve this issue, but for now I hope that this solution helps you.

0

Programming languages are not made equal.

Python is four times slower than C++ or Java

when no external efficient libs are used.

  • The current pgAdmin 4 has been rewritten in Python as you can check here: github pgadmin4 and here pgadmin download

  • The older pgAdmin 3 was written in C++ as you can check in its source code here enter link description here Python is four times slower than languages like C++ or Java. Part of the user interface has also moved to Javascript.

Change to different data structures

  • Each programming language comes with its default datastructures. A change to a different programming language can cause that less effective structures are used . And this cause a many fold decrease in performance if great care is not taken.

These changes could explain that pgAdmin 4 is slow.

wromma
  • 21
  • 1
  • 5
  • 1
    no, the latest version is orders of magnitude slower than the pervious version – Ian Turton Oct 20 '22 at 09:50
  • 1
    "orders of magnitude" is very generic. Please quantify. And attach a benchmark that measures the slowness. All the best from me. – wromma Oct 27 '22 at 06:03
  • 2
    queries that run in milliseconds take minutes to display in pgadmin4 6.12 – Ian Turton Oct 27 '22 at 07:30
  • Very generic statement and has no sense. Please atach this query so we can verufy it. – wromma Nov 03 '22 at 15:29
  • It was a simple select * on a table with 90 rows - not worth noting down, I just moved on to DBeaver for a while - 6.15 seems to be much better than 6.12 so I gave up worrying about it, though it is still slow when it's auto-completing compared to say 6.8 – Ian Turton Nov 03 '22 at 17:00
  • The user has specifically asked about performance of USER INTERFACE of this tool. You could put this interesting issue with slow queries in a separate question that could also draw interest for everybodys good. – wromma Nov 04 '22 at 08:00