Re: First query on each connection is too slow - Mailing list pgsql-general

From Maksim Milyutin
Subject Re: First query on each connection is too slow
Date
Msg-id 70a1988a-4ec0-09e2-b31c-4abf4c6d2e2f@gmail.com
Whole thread Raw
In response to First query on each connection is too slow  (Vadim Nevorotin <nevorotin@gmail.com>)
List 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

pgsql-general by date:

Previous
From: Pavan Teja
Date:
Subject: Re: First query on each connection is too slow
Next
From: Vadim Nevorotin
Date:
Subject: Re: First query on each connection is too slow