[pgpool-general: 5588] Fwd: insanely slow first query, then normal speed

Jon jon at jojati.com
Sun Jun 25 12:39:31 JST 2017


Sorry to answer my own question - i *think* one problem was the hostname
not resolving properly.. i guess it was trying to lookup dns...

I'm still testing..!

---------- Forwarded message ----------
From: Jon <jon at jojati.com>
Date: Sun, Jun 25, 2017 at 12:08 PM
Subject: insanely slow first query, then normal speed
To: pgpool-general at pgpool.net


Hi,

When I connect to pgpool on the slave, the first request is insanely slow,
subsequent requests are fast.

Does anyone know why this might be?

Pgpool: 3.6.4, Postgres, 9.6.3

NOTE: it also seems to take a long time to connect to pgpool using psql.. i
seem to remember an older version not having this delay

I've tried:

   - with pool_hba turned on and off - no difference
   - i compiled pgpool (3.6.4) from source - no difference (was using the
   pgdg ubuntu 16.04 binaries before

*The below example showing the first request taking 58000ms! Subsequent
queries take 72ms...*

e.g.

root at db-slave:~# sudo -u postgres psql -h127.0.0.1 -p5433 mydb

sudo: unable to resolve host db-slave

could not change directory to "/root": Permission denied

psql (9.6.3)

Type "help" for help.

mydb=# \timing

Timing is on.

mydb=# select * from users where id=90000;

*Time: 58593.186 ms*

mydb=# select * from users where id=90000;

*Time: 0.750 ms*

mydb=# select * from users where id=80000;

*Time: 72.081ms*

mydb=# select * from designs where id=78884;

*Time: 1.648 ms*

Time: 72.081 ms

picto=#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20170625/83ed4e4b/attachment.html>


More information about the pgpool-general mailing list