Skip site navigation (1) Skip section navigation (2)

Execution from java - slow

From: Jayadevan M <Jayadevan(dot)Maymala(at)ibsplc(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Execution from java - slow
Date: 2012-08-27 12:37:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Hello all,

I have a plpgsql function that takes a few seconds (less than 5) when 
executed  from psql. The same function, when invoked from java via a 
prepared statement takes a few minutes. There are a few queries in the 
function. Out of these, the first query takes input parameters for 
filtering the data. It is this query which takes a long time when the 
procedure is invoked from java. To ensure that the query does use actual 
values (and not bind variables) for optimization, we used 

select x.col_type_desc,x.acc_id,acc_svr from (.....
using d_from_date,d_to_date

It did not help. Any suggestions? It is from_date and to_date on which 
data gets filtered. We are using the same values for filtering, when we 
execute it from java/psql



"The information in this e-mail and any attachment is intended only for 
the person to whom it is addressed and may contain confidential and/or 
privileged material. If you have received this e-mail in error, kindly 
contact the sender and destroy all copies of the original communication. 
IBS makes no warranty, express or implied, nor guarantees the accuracy, 
adequacy or completeness of the information contained in this email or any 
attachment and is not liable for any errors, defects, omissions, viruses 
or for resultant loss or damage, if any, direct or indirect."


pgsql-performance by date

Next:From: Albe LaurenzDate: 2012-08-27 12:47:12
Subject: Re: Execution from java - slow
Previous:From: Liron ShiriDate: 2012-08-26 12:51:24
Subject: Investigating the reason for a very big TOAST table size

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group