From: Justin Pryzby <pryzby@telsasoft.com>
To: Manoj Kumar <manojkumar@temenos.com>
Cc: pgsql-performance@postgresql.org, "A.S. Fazlu Rahman" <fazlur@temenos.com>
Subject: Re: Performance Issue on a table
Date: Fri, 23 Jul 2021 13:18:17 -0500
Message-ID: <20210723181817.GP19620@telsasoft.com> (raw)
In-Reply-To: <SJ0PR04MB7662C951C68CC4B0D694A770D9E49@SJ0PR04MB7662.namprd04.prod.outlook.com>
References: <SJ0PR04MB7662C951C68CC4B0D694A770D9E49@SJ0PR04MB7662.namprd04.prod.outlook.com>
On Thu, Jul 22, 2021 at 01:54:25PM +0000, Manoj Kumar wrote:
> Recently we have noticed that in one of our DB instances there is a potential delay in querying a table from java code. could you please check the attached log and help understand what is the problem and which direction should be look into solving this delay of 4 odd mins ?
I'm not familiar with the log, but it looks like the delay is in query parsing
(ParseComplete). Which seems weird. You might try running wireshark to verify
that. Or check postgres logs, and make sure the query isn't being blocked by
DDL commands. Make sure these are enabled:
log_lock_waits = 'on'
deadlock_timeout = '1s'
> 4:25:00 PM ... execute FINEST: simple execute, handler=org.postgresql.jdbc.PgStatement$StatementResultHandler@13e344d, maxRows=0, fetchSize=0, flags=1
> 4:25:00 PM ... sendSimpleQuery FINEST: FE=> SimpleQuery(query="SAVEPOINT PGJDBC_AUTOSAVE")
> 4:25:00 PM ... sendParse FINEST: FE=> Parse(stmt=null,query="SELECT RECID FROM TAFJ_HASHLOCKS WHERE RECID = $1 FOR UPDATE NOWAIT ",oids={1043})
> 4:25:00 PM ... sendBind FINEST: FE=> Bind(stmt=null,portal=null,$1=<'256292129'>,type=VARCHAR)
> 4:25:00 PM ... sendDescribePortal FINEST: FE=> Describe(portal=null)
> 4:25:00 PM ... sendExecute FINEST: FE=> Execute(portal=null,limit=0)
> 4:25:00 PM ... sendSync FINEST: FE=> Sync
> 4:25:00 PM ... receiveCommandStatus FINEST: <=BE CommandStatus(RELEASE)
> 4:25:00 PM ... receiveRFQ FINEST: <=BE ReadyForQuery(T)
> 4:25:00 PM ... receiveCommandStatus FINEST: <=BE CommandStatus(SAVEPOINT)
> 4:25:00 PM ... receiveRFQ FINEST: <=BE ReadyForQuery(T)
> 4:29:20 PM ... processResults FINEST: <=BE ParseComplete [null]
> 4:29:20 PM ... processResults FINEST: <=BE BindComplete [unnamed]
> 4:29:20 PM ... receiveFields FINEST: <=BE RowDescription(1)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: pryzby@telsasoft.com, manojkumar@temenos.com, fazlur@temenos.com
Subject: Re: Performance Issue on a table
In-Reply-To: <20210723181817.GP19620@telsasoft.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox