Azure Postgresql High connection establishment time - Mailing list pgsql-general

From Abhay Gupta
Subject Azure Postgresql High connection establishment time
Date
Msg-id CACpkcfw2+OB=B17-DkNC8erAPALYPLErK2opGv6LhKWU+L6f6A@mail.gmail.com
Whole thread Raw
Responses Re: Azure Postgresql High connection establishment time  (Michael Lewis <mlewis@entrata.com>)
Re: Azure Postgresql High connection establishment time  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general

Hi

we are writing a python(3.9) azure function hosted on linux which is connecting to azure postgresql 11. We are using psycopg2 to connect the azure function to postgresql.

we are noticing the connection establishment is taking around 200-300 ms. Below is the statment.

conn=psycopg2.connect(conn_string)

Conn_string includes host, user, password, dbname, sslmode=require

The connection establishment time is very high as our functions are written to be very high performance.

can you please let us know if there is something we should be doing to reduce the connection establishment time.

Thanks

pgsql-general by date:

Previous
From: ramikvl@gmail.com
Date:
Subject: Re: jsonb Indexing
Next
From: Laurenz Albe
Date:
Subject: Re: Possibilities for optimizing inserts across oracle_fdw foreign data wrapper