Home > Enterprise >  Postgres DB performance issue
Postgres DB performance issue

Time:11-25

I'm suspecting our Postgres DB has performance issue so I'm troubleshooting.

First I'm running a query below from my local laptop like below;

 "select * from table1"

And this table has 7 rows and it taks around 506 ms, seems slow.

enter image description here

So after then I run the query below;

 EXPLAIN ANALYZE select * from table1;

Output is below;

enter image description here

So if I'm correct, output says query took 0.008 second?

So how can I understand these values? Are these values ok?

Ps : Postgresql ver is 10.4 but I couldn't found the tag!

Thanks!

CodePudding user response:

The difference must be network lag.

You could try with a query that does nothing really and see if you get a similar duration:

SELECT 1;

That should show the same duration and would confirm that there is a network latency of around 250 ms.

  • Related