Re: First query on each connection is too slow

From: Maksim Milyutin <milyutinma(at)gmail(dot)com>
To: Vadim Nevorotin <nevorotin(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: First query on each connection is too slow
Date: 2018-06-13 10:34:32
Message-ID: 70a1988a-4ec0-09e2-b31c-4abf4c6d2e2f@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 13.06.2018 12:55, Vadim Nevorotin wrote:

> Nested Loop Left Join  (cost=0.82..26.41 rows=1 width=4) *(actual
> time=49.290..49.297 rows=1 loops=1)*
>    Join Filter: ((s_2.connamespace = n.oid) AND (s_2.conrelid = c.oid)
> AND (a.attnum = ANY (s_2.conkey)))
>    Buffers: shared hit=18
> ...
> * Planning time: 2.589 ms
>  Execution time: 49.467 ms*
>
> (45 rows)
>
> And there are two questions: why this problem occurs and how can I fix it?

You could catch a performance profile of this issue using perf tools and
iterative executing this query in new sessions via pgbench, for example.
This would greatly facilitate the search for the cause of your problem.

--
Regards,
Maksim Milyutin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vadim Nevorotin 2018-06-13 10:44:54 Re: First query on each connection is too slow
Previous Message Pavan Teja 2018-06-13 10:25:05 Re: First query on each connection is too slow