Subject | RE: [ib-support] prepared insert |
---|---|
Author | Leyne, Sean |
Post date | 2001-06-01T20:35:37Z |
I can think of a couple of reasons of the top of my head...
1) Your default commit mode could be "auto-commit", which means that
each iteration of the loop was starting/committing a transaction.
2) The database access method you are using is just "sucking wind", what
are you using to connect to the database?
3) You are performing your test using a table which you deleted all the
rows, just prior to executing the test. Try executing "SELECT * from
table" before running the test, this will force a garbage collection to
be performed - this will be the 'fairest' test situation.
4) Your test resulted in the sweep process starting, which held up the
test until it was completed.
I know that using Delphi/BDE you should be able to insert 100 records in
a table in < 1 sec., so something is obviously wrong with your test.
Sean
-----Original Message-----
From: pmoon7@... [mailto:pmoon7@...]
Sent: Friday, June 01, 2001 3:17 PM
To: ib-support@yahoogroups.com
Subject: [ib-support] prepared insert
System.gc();
prepStmtInsert = genSql.setPrepStmtValue(prepStmtInsert, fileRow);
for (int cc=0; cc<100; cc++)
{
int intXX = prepStmtInsert.executeUpdate();
}
I wrote the above preparedStatement in java to insert 100 records into
IB5.6. It took 250 seconds to update. In MS Access using OBDC, the
same insert of 100 records took 80 seconds. Index was turned off and
I am using JDBC to IB5.6, seems like it should beat MS Access. I must
be doing something wrong. Appreciate any help...thanks
1) Your default commit mode could be "auto-commit", which means that
each iteration of the loop was starting/committing a transaction.
2) The database access method you are using is just "sucking wind", what
are you using to connect to the database?
3) You are performing your test using a table which you deleted all the
rows, just prior to executing the test. Try executing "SELECT * from
table" before running the test, this will force a garbage collection to
be performed - this will be the 'fairest' test situation.
4) Your test resulted in the sweep process starting, which held up the
test until it was completed.
I know that using Delphi/BDE you should be able to insert 100 records in
a table in < 1 sec., so something is obviously wrong with your test.
Sean
-----Original Message-----
From: pmoon7@... [mailto:pmoon7@...]
Sent: Friday, June 01, 2001 3:17 PM
To: ib-support@yahoogroups.com
Subject: [ib-support] prepared insert
System.gc();
prepStmtInsert = genSql.setPrepStmtValue(prepStmtInsert, fileRow);
for (int cc=0; cc<100; cc++)
{
int intXX = prepStmtInsert.executeUpdate();
}
I wrote the above preparedStatement in java to insert 100 records into
IB5.6. It took 250 seconds to update. In MS Access using OBDC, the
same insert of 100 records took 80 seconds. Index was turned off and
I am using JDBC to IB5.6, seems like it should beat MS Access. I must
be doing something wrong. Appreciate any help...thanks