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

Re: Execution from java - slow

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Jayadevan M *EXTERN*" <Jayadevan(dot)Maymala(at)ibsplc(dot)com>,<pgsql-performance(at)postgresql(dot)org>
Subject: Re: Execution from java - slow
Date: 2012-08-27 12:47:12
Message-ID: D960CB61B694CF459DCFB4B0128514C2084EFBF1@exadv11.host.magwien.gv.at (view raw or flat)
Thread:
Lists: pgsql-performance
Jayadevan M wrote:
> 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
> 
> execute
> '
> 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

Use the auto_explain contrib with
auto_explain.log_nested_statements=on
to see the statements that are really executed
and compare!

Yours,
Laurenz Albe


In response to

pgsql-performance by date

Next:From: Daniel FarinaDate: 2012-08-27 16:42:19
Subject: Re: Investigating the reason for a very big TOAST table size
Previous:From: Jayadevan MDate: 2012-08-27 12:37:32
Subject: Execution from java - slow

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