pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
prepareThreshold=1 and statement.executeBatch() ??
7+ messages / 5 participants
[nested] [flat]

* prepareThreshold=1 and statement.executeBatch() ??
@ 2005-11-13 06:48 Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
  2005-11-13 09:27 ` Re: prepareThreshold=1 and statement.executeBatch() ?? Kris Jurka <books@ejurka.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Joost Kraaijeveld @ 2005-11-13 06:48 UTC (permalink / raw)
  To: pgsql-jdbc

Hi,

I have a connection that is created with "prepareThreshold=1" in the
connection string. I use a prepared statement that I fill with
addbatch() and that I execute with executeBatch() (for full source: see
"application.java" attachment).

Tracing all statements in my PostgreSQL logs I see (for the full log:
see "postgresql.log" attachement):

LOG:  statement: PREPARE S_2 AS update prototype.customers set title=
$1 , defaultcurrency=$2, defaulttermsofdelivery=$3 ,
defaulttermsofpayment=$4 where customernumber=$5
LOG:  statement: <BIND>
LOG:  statement: EXECUTE <unnamed>  [PREPARE:  update
prototype.customers set title=$1 , defaultcurrency=$2, defaultter
msofdelivery=$3, defaulttermsofpayment=$4 where customernumber=$5]
LOG:  duration: 773.841 ms
LOG:  statement: <BIND>
LOG:  statement: EXECUTE <unnamed>  [PREPARE:  update
prototype.customers set title=$1 , defaultcurrency=$2, defaultter
msofdelivery=$3, defaulttermsofpayment=$4 where customernumber=$5]
LOG:  duration: 377.981 ms

Does this output mean that the prepared statement with the name "S_2" is
not used in the following 2 EXECUTE statements and that therefor each
execute statement is planned again? 

BTW: I used PostgreSQL 8.1 and PostgreSQL-8.1-404.jdbc3.jar.

TIA

-- 
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: J.Kraaijeveld@Askesis.nl
web: www.askesis.nl 

Attachments:

Application.java (text/x-java, 4.6K) download package nl.askesis; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Statement; import java.sql.Timestamp; import java.util.HashMap; public class Application { /** * @param args */ public static void main(String[] args) { Timestamp startTime = new Timestamp(System.currentTimeMillis()); System.err.println( "Conversion started: " + startTime); try{ Class.forName("org.postgresql.Driver"); Connection connection = DriverManager.getConnection("jdbc:postgresql://Panoramix.Askesis.nl:5432/muntdev?prepareThreshold=1","postgres", ""); Statement titlesSelectStatement = connection.createStatement(); ResultSet titlesResultSet = titlesSelectStatement .executeQuery("select objectid, code from prototype.titles"); HashMap<String,String> titles = new HashMap<String,String>(); while( titlesResultSet.next() ){ titles.put(titlesResultSet.getString(2),titlesResultSet.getString(1)); } titlesSelectStatement.close(); Statement currenciesSelectStatement = connection.createStatement(); ResultSet currenciesResultSet = currenciesSelectStatement.executeQuery("select objectid, code from prototype.currencies"); HashMap<String,String> currencies = new HashMap<String,String>(); while( currenciesResultSet.next() ){ currencies.put(currenciesResultSet.getString(2),currenciesResultSet.getString(1)); } currenciesSelectStatement.close(); Statement deliveryTermsSelectStatement = connection.createStatement(); ResultSet deliveryTermsResultSet = deliveryTermsSelectStatement.executeQuery("select objectid, deliveryconditioncode from prototype.deliveryterms "); HashMap<String,String> deliveryTerms = new HashMap<String,String>(); while( deliveryTermsResultSet.next() ){ deliveryTerms.put(deliveryTermsResultSet.getString(2),deliveryTermsResultSet.getString(1)); } deliveryTermsSelectStatement.close(); Statement paymentTermsSelectStatement = connection.createStatement(); ResultSet paymentTermsResultSet = paymentTermsSelectStatement.executeQuery("select objectid, paymentconditioncode from prototype.paymentterms"); HashMap<String,String> paymentTerms= new HashMap<String,String>(); while( paymentTermsResultSet.next() ){ paymentTerms.put(paymentTermsResultSet.getString(2),paymentTermsResultSet.getString(1)); } paymentTermsSelectStatement.close(); System.err.println("We got the infra"); connection.setAutoCommit(false); Statement customersSelectStatement = connection.createStatement(); ResultSet customersResultSet = customersSelectStatement.executeQuery("select klantnummer, titelatuurcode, valuta_code, leveringsconditie, betalingsconditie from odbc.klt_alg"); System.err.println("We got the customers"); PreparedStatement customersUpdateStatement = connection.prepareStatement("update prototype.customers set title=? , defaultcurrency=?, defaulttermsofdelivery=?, defaulttermsofpayment=? where customernumber=?"); int record = 0; while( customersResultSet.next() ) { if( (++record % 5) == 0){ System.err.println( "Handling batch record: " + record); // For debugging purposes we bail out after 4 instead of all 1.100.0000 customers break; } Integer customerNumber = customersResultSet.getInt(1); String titleObjectId = "";//= titles.get(customersResultSet.getString(2)); String currencyObjectId = "";//currencies.get(customersResultSet.getString(3)); String deliveryTermsObjectId = "";//deliveryTerms.get(customersResultSet.getString(4)); String paymentTermsObjectId = "";//paymentTerms.get(customersResultSet.getString(5)); customersUpdateStatement.setInt(1,customerNumber); customersUpdateStatement.setString(2,titleObjectId); customersUpdateStatement.setString(3,currencyObjectId); customersUpdateStatement.setString(4,deliveryTermsObjectId); customersUpdateStatement.setString(5,paymentTermsObjectId); customersUpdateStatement.addBatch(); } customersUpdateStatement.executeBatch(); connection.commit(); customersSelectStatement.close(); customersUpdateStatement.close(); connection.close(); Timestamp endTime = new Timestamp(System.currentTimeMillis()); System.err.println( "Conversion started: " + startTime); System.err.println( "Conversion finished: " + endTime); }catch (Exception e) { e.printStackTrace(); } } }
postgresql.log (text/x-log, 2.7K) download LOG: statement: PREPARE <unnamed> AS select objectid, code from prototype.titles LOG: statement: <BIND> LOG: statement: EXECUTE <unnamed> [PREPARE: select objectid, code from prototype.titles] LOG: duration: 0.082 ms LOG: statement: PREPARE <unnamed> AS select objectid, code from prototype.currencies LOG: statement: <BIND> LOG: statement: EXECUTE <unnamed> [PREPARE: select objectid, code from prototype.currencies] LOG: duration: 0.092 ms LOG: statement: PREPARE <unnamed> AS select objectid, deliveryconditioncode from prototype.deliveryterms LOG: statement: <BIND> LOG: statement: EXECUTE <unnamed> [PREPARE: select objectid, deliveryconditioncode from prototype.deliveryterms ] LOG: duration: 0.110 ms LOG: statement: PREPARE <unnamed> AS select objectid, paymentconditioncode from prototype.paymentterms LOG: statement: <BIND> LOG: statement: EXECUTE <unnamed> [PREPARE: select objectid, paymentconditioncode from prototype.paymentterms] LOG: duration: 0.059 ms LOG: statement: PREPARE S_1 AS BEGIN LOG: statement: <BIND> LOG: statement: EXECUTE <unnamed> [PREPARE: BEGIN] LOG: duration: 0.023 ms LOG: statement: PREPARE <unnamed> AS select klantnummer, titelatuurcode, valuta_code, leveringsconditie, betalingscond itie from odbc.klt_alg LOG: statement: <BIND> LOG: statement: EXECUTE <unnamed> [PREPARE: select klantnummer, titelatuurcode, valuta_code, leveringsconditie, beta lingsconditie from odbc.klt_alg] LOG: duration: 2484.801 ms LOG: statement: PREPARE S_2 AS update prototype.customers set title=$1 , defaultcurrency=$2, defaulttermsofdelivery=$3 , defaulttermsofpayment=$4 where customernumber=$5 LOG: statement: <BIND> LOG: statement: EXECUTE <unnamed> [PREPARE: update prototype.customers set title=$1 , defaultcurrency=$2, defaultter msofdelivery=$3, defaulttermsofpayment=$4 where customernumber=$5] LOG: duration: 773.841 ms LOG: statement: <BIND> LOG: statement: EXECUTE <unnamed> [PREPARE: update prototype.customers set title=$1 , defaultcurrency=$2, defaultter msofdelivery=$3, defaulttermsofpayment=$4 where customernumber=$5] LOG: duration: 377.981 ms LOG: statement: <BIND> LOG: statement: EXECUTE <unnamed> [PREPARE: update prototype.customers set title=$1 , defaultcurrency=$2, defaultter msofdelivery=$3, defaulttermsofpayment=$4 where customernumber=$5] LOG: duration: 361.315 ms LOG: statement: <BIND> LOG: statement: EXECUTE <unnamed> [PREPARE: update prototype.customers set title=$1 , defaultcurrency=$2, defaultter msofdelivery=$3, defaulttermsofpayment=$4 where customernumber=$5] LOG: duration: 364.087 ms LOG: statement: PREPARE S_3 AS COMMIT LOG: statement: <BIND> LOG: statement: EXECUTE <unnamed> [PREPARE: COMMIT] LOG: duration: 0.037 ms
^ permalink raw reply [nested|flat] 7+ messages in thread

* Re: prepareThreshold=1 and statement.executeBatch() ??
  2005-11-13 06:48 prepareThreshold=1 and statement.executeBatch() ?? Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
@ 2005-11-13 09:27 ` Kris Jurka <books@ejurka.com>
  2005-11-13 10:09   ` Re: prepareThreshold=1 and statement.executeBatch() ?? Oliver Jowett <oliver@opencloud.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Kris Jurka @ 2005-11-13 09:27 UTC (permalink / raw)
  To: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>; +Cc: pgsql-jdbc; pgsql-hackers@postgresql.org



On Sun, 13 Nov 2005, Joost Kraaijeveld wrote:

> I have a connection that is created with "prepareThreshold=1" in the
> connection string. I use a prepared statement that I fill with
> addbatch() and that I execute with executeBatch() (for full source: see
> "application.java" attachment).
>
> LOG:  statement: PREPARE S_2 AS update prototype.customers set title=
> $1 , defaultcurrency=$2, defaulttermsofdelivery=$3 ,
> defaulttermsofpayment=$4 where customernumber=$5
> LOG:  statement: <BIND>
> LOG:  statement: EXECUTE <unnamed>  [PREPARE:  update
> prototype.customers set title=$1 , defaultcurrency=$2, defaultter
> msofdelivery=$3, defaulttermsofpayment=$4 where customernumber=$5]
> LOG:  duration: 773.841 ms
> LOG:  statement: <BIND>
> LOG:  statement: EXECUTE <unnamed>  [PREPARE:  update
> prototype.customers set title=$1 , defaultcurrency=$2, defaultter
> msofdelivery=$3, defaulttermsofpayment=$4 where customernumber=$5]
> LOG:  duration: 377.981 ms
>
> Does this output mean that the prepared statement with the name "S_2" is
> not used in the following 2 EXECUTE statements and that therefor each
> execute statement is planned again?
>

No, this actually looks like a bug in the server side logging.  The JDBC 
driver issues:

FE=> Parse(stmt=S_1,query="INSERT INTO tt VALUES ($1)",oids={23})
FE=> Bind(stmt=S_1,portal=null,$1=<1>)
FE=> Describe(portal=null)
FE=> Execute(portal=null,limit=1)
FE=> Bind(stmt=S_1,portal=null,$1=<2>)
FE=> Describe(portal=null)
FE=> Execute(portal=null,limit=1)
FE=> Sync

I assume the server side logging code is getting confused because it uses 
a named statement, but the unnamed portal.

Kris Jurka




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: prepareThreshold=1 and statement.executeBatch() ??
  2005-11-13 06:48 prepareThreshold=1 and statement.executeBatch() ?? Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
  2005-11-13 09:27 ` Re: prepareThreshold=1 and statement.executeBatch() ?? Kris Jurka <books@ejurka.com>
@ 2005-11-13 10:09   ` Oliver Jowett <oliver@opencloud.com>
  2005-11-13 16:04     ` Re: prepareThreshold=1 and statement.executeBatch() ?? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Oliver Jowett @ 2005-11-13 10:09 UTC (permalink / raw)
  To: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>; +Cc: Kris Jurka <books@ejurka.com>; pgsql-jdbc; pgsql-hackers@postgresql.org

> On Sun, 13 Nov 2005, Joost Kraaijeveld wrote:
> 
>> I have a connection that is created with "prepareThreshold=1" in the
>> connection string. I use a prepared statement that I fill with
>> addbatch() and that I execute with executeBatch() (for full source: see
>> "application.java" attachment).
>>
>> LOG:  statement: PREPARE S_2 AS update prototype.customers set title=
>> $1 , defaultcurrency=$2, defaulttermsofdelivery=$3 ,
>> defaulttermsofpayment=$4 where customernumber=$5
>> LOG:  statement: <BIND>
>> LOG:  statement: EXECUTE <unnamed>  [PREPARE:  update
>> prototype.customers set title=$1 , defaultcurrency=$2, defaultter
>> msofdelivery=$3, defaulttermsofpayment=$4 where customernumber=$5]
>> LOG:  duration: 773.841 ms
>> LOG:  statement: <BIND>
>> LOG:  statement: EXECUTE <unnamed>  [PREPARE:  update
>> prototype.customers set title=$1 , defaultcurrency=$2, defaultter
>> msofdelivery=$3, defaulttermsofpayment=$4 where customernumber=$5]
>> LOG:  duration: 377.981 ms
>>
>> Does this output mean that the prepared statement with the name "S_2" is
>> not used in the following 2 EXECUTE statements and that therefor each
>> execute statement is planned again?

The driver does not actually issue PREPARE or EXECUTE statements; the 
server is pretending that the protocol-level Prepare/Bind/Execute 
messages are actually something issuing PREPARE/EXECUTE at the SQL level 
(but in reality, nothing is issuing precisely the queries that are being 
logged -- the query that is submitted is just your plain "update ..." 
query).

The PREPARE S_2 AS .. logs that a Prepare message was processed (for the 
query "update ..."). This does parsing/planning work and creates a named 
prepared statement called S_2 on the server.

The <BIND> means that some previously prepared statement (you can't tell 
which statement from what is logged! -- but it's S_2 in this case) is 
being bound to parameter values via a Bind message, creating an unnamed 
portal.

The EXECUTE <unnamed> means the unnamed portal is being executed via an 
Execute message. It also logs the underlying statement at that point, 
but not the statement name (!).

So if I read the logs right, the single prepared statement S_2 *is* 
being reused in the case above.

Yes, it's a horribly confusing way for the server to log things. I 
raised it on -hackers earlier in the 8.1 cycle, but I've not had time to 
work on it myself.

-O



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: prepareThreshold=1 and statement.executeBatch() ??
  2005-11-13 06:48 prepareThreshold=1 and statement.executeBatch() ?? Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
  2005-11-13 09:27 ` Re: prepareThreshold=1 and statement.executeBatch() ?? Kris Jurka <books@ejurka.com>
  2005-11-13 10:09   ` Re: prepareThreshold=1 and statement.executeBatch() ?? Oliver Jowett <oliver@opencloud.com>
@ 2005-11-13 16:04     ` Tom Lane <tgl@sss.pgh.pa.us>
  2005-11-16 00:47       ` Re: prepareThreshold=1 and statement.executeBatch() ?? Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Tom Lane @ 2005-11-13 16:04 UTC (permalink / raw)
  To: Oliver Jowett <oliver@opencloud.com>; +Cc: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>; Kris Jurka <books@ejurka.com>; pgsql-jdbc; pgsql-hackers@postgresql.org; Bruce Momjian <pgman@candle.pha.pa.us>

Oliver Jowett <oliver@opencloud.com> writes:
> The driver does not actually issue PREPARE or EXECUTE statements; the 
> server is pretending that the protocol-level Prepare/Bind/Execute 
> messages are actually something issuing PREPARE/EXECUTE at the SQL level 

I had not realized that the logging code recently added to Parse/Bind/Execute
deliberately obscures the difference between a Parse message and an SQL
PREPARE (etc).  This is a terrible decision IMHO and needs to be fixed
forthwith.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: prepareThreshold=1 and statement.executeBatch() ??
  2005-11-13 06:48 prepareThreshold=1 and statement.executeBatch() ?? Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
  2005-11-13 09:27 ` Re: prepareThreshold=1 and statement.executeBatch() ?? Kris Jurka <books@ejurka.com>
  2005-11-13 10:09   ` Re: prepareThreshold=1 and statement.executeBatch() ?? Oliver Jowett <oliver@opencloud.com>
  2005-11-13 16:04     ` Re: prepareThreshold=1 and statement.executeBatch() ?? Tom Lane <tgl@sss.pgh.pa.us>
@ 2005-11-16 00:47       ` Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Bruce Momjian @ 2005-11-16 00:47 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Oliver Jowett <oliver@opencloud.com>; Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>; Kris Jurka <books@ejurka.com>; pgsql-jdbc; pgsql-hackers@postgresql.org

Tom Lane wrote:
> Oliver Jowett <oliver@opencloud.com> writes:
> > The driver does not actually issue PREPARE or EXECUTE statements; the 
> > server is pretending that the protocol-level Prepare/Bind/Execute 
> > messages are actually something issuing PREPARE/EXECUTE at the SQL level 
> 
> I had not realized that the logging code recently added to Parse/Bind/Execute
> deliberately obscures the difference between a Parse message and an SQL
> PREPARE (etc).  This is a terrible decision IMHO and needs to be fixed
> forthwith.

The output does look slightly different and was approved by the folks
using this feature.  I don't understand the panic about it.

If people using the feature want to submit a patch to modify it, that
seems fine.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: prepareThreshold=1 and statement.executeBatch() ??
@ 2005-11-13 10:03 Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
  2005-11-13 19:02 ` Re: prepareThreshold=1 and statement.executeBatch() ?? Kris Jurka <books@ejurka.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Joost Kraaijeveld @ 2005-11-13 10:03 UTC (permalink / raw)
  To: Kris Jurka <books@ejurka.com>; +Cc: pgsql-jdbc; pgsql-hackers@postgresql.org

Hi Kris,

You have tested this with an insert statement. Could you do that also for an update (or try to tell me how I can do that)? I am getting very strange differences in running time between inserts and update ( 260000 inserts are measured in seconds, 260000 updates over 1 column in the same table are measured in minutes)

TIA

Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: J.Kraaijeveld@Askesis.nl
web: www.askesis.nl 


> -----Oorspronkelijk bericht-----
> Van: Kris Jurka [mailto:books@ejurka.com]
> Verzonden: zondag 13 november 2005 10:27
> Aan: Joost Kraaijeveld
> CC: pgsql-jdbc@postgresql.org; pgsql-hackers@postgresql.org
> Onderwerp: Re: [JDBC] prepareThreshold=1 and 
> statement.executeBatch() ??
> 
> 
> 
> 
> On Sun, 13 Nov 2005, Joost Kraaijeveld wrote:
> 
> > I have a connection that is created with "prepareThreshold=1" in the
> > connection string. I use a prepared statement that I fill with
> > addbatch() and that I execute with executeBatch() (for full 
> source: see
> > "application.java" attachment).
> >
> > LOG:  statement: PREPARE S_2 AS update prototype.customers 
> set title=
> > $1 , defaultcurrency=$2, defaulttermsofdelivery=$3 ,
> > defaulttermsofpayment=$4 where customernumber=$5
> > LOG:  statement: <BIND>
> > LOG:  statement: EXECUTE <unnamed>  [PREPARE:  update
> > prototype.customers set title=$1 , defaultcurrency=$2, defaultter
> > msofdelivery=$3, defaulttermsofpayment=$4 where customernumber=$5]
> > LOG:  duration: 773.841 ms
> > LOG:  statement: <BIND>
> > LOG:  statement: EXECUTE <unnamed>  [PREPARE:  update
> > prototype.customers set title=$1 , defaultcurrency=$2, defaultter
> > msofdelivery=$3, defaulttermsofpayment=$4 where customernumber=$5]
> > LOG:  duration: 377.981 ms
> >
> > Does this output mean that the prepared statement with the 
> name "S_2" is
> > not used in the following 2 EXECUTE statements and that 
> therefor each
> > execute statement is planned again?
> >
> 
> No, this actually looks like a bug in the server side 
> logging.  The JDBC 
> driver issues:
> 
> FE=> Parse(stmt=S_1,query="INSERT INTO tt VALUES ($1)",oids={23})
> FE=> Bind(stmt=S_1,portal=null,$1=<1>)
> FE=> Describe(portal=null)
> FE=> Execute(portal=null,limit=1)
> FE=> Bind(stmt=S_1,portal=null,$1=<2>)
> FE=> Describe(portal=null)
> FE=> Execute(portal=null,limit=1)
> FE=> Sync
> 
> I assume the server side logging code is getting confused 
> because it uses 
> a named statement, but the unnamed portal.
> 
> Kris Jurka
> 
> 



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: prepareThreshold=1 and statement.executeBatch() ??
  2005-11-13 10:03 Re: prepareThreshold=1 and statement.executeBatch() ?? Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
@ 2005-11-13 19:02 ` Kris Jurka <books@ejurka.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Kris Jurka @ 2005-11-13 19:02 UTC (permalink / raw)
  To: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>; +Cc: pgsql-jdbc; pgsql-hackers@postgresql.org



On Sun, 13 Nov 2005, Joost Kraaijeveld wrote:

> You have tested this with an insert statement. Could you do that also 
> for an update (or try to tell me how I can do that)? I am getting very 
> strange differences in running time between inserts and update ( 260000 
> inserts are measured in seconds, 260000 updates over 1 column in the 
> same table are measured in minutes)
>

Certainly there are different costs associated with inserts vs. updates. 
An insert just needs to jam a new row in somewhere, but the update must 
first search the table to find the existing row.  If you do not have an 
index this will take a while.  If you update the same row every time this 
will also take a while because you'll be creating a whole bunch of dead 
rows in the table.  Some more information on the table and type of updates 
could bring the update cost down, but comparing insert vs. update times is 
not a reasonable thing to do.

Kris Jurka




^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2005-11-16 00:47 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-11-13 06:48 prepareThreshold=1 and statement.executeBatch() ?? Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
2005-11-13 09:27 ` Kris Jurka <books@ejurka.com>
2005-11-13 10:09   ` Oliver Jowett <oliver@opencloud.com>
2005-11-13 16:04     ` Tom Lane <tgl@sss.pgh.pa.us>
2005-11-16 00:47       ` Bruce Momjian <pgman@candle.pha.pa.us>
2005-11-13 10:03 Re: prepareThreshold=1 and statement.executeBatch() ?? Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
2005-11-13 19:02 ` Kris Jurka <books@ejurka.com>

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