I have a database with a table with about 130000 rows. Inserting and
selection of rows are very fast, but for the update takes about a second
(1033ms the first time, about 850ms after). Is there a way to improve
the performance of the database? The update of the archive would take
about 6 hours ...
I've tried with .executeUpdate, PreparedStatement, modify value with
.updateRow... but the result is the same.
Before continuing, I would like to know if this execution time is normal
or is possible improve it, maybe setting some driver properties.
-Roberto
Questa e-mail è stata controllata per individuare virus con Avast antivirus. http://www.avast.com
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Something truly strange Roberto, your findings are absolutly abnormal.
At this very moment I haven't elements enough to help you.
I can just suggest to use a transaction if you're executing more update statement: conn.setAutocommit(false) at the start and conn.commit() at the end (If you're in autocommit mode the execution time may be drammatically high because of IO)
I would need your critic code to be helpful. May you post it along?
cheers Marco
Last edit: Marco Amadei 2015-04-28
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
mmmmmm, it comes from jackcess, the underlying IO library.
Maybe something bad in your db format.
I would use the MS Access Compact and Repair tool and see if this solves the issue, before send to them the Exception stack-trace.
You may send it here too, it may be an inspiration source.
Last edit: Marco Amadei 2015-04-28
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a database with a table with about 130000 rows. Inserting and
selection of rows are very fast, but for the update takes about a second
(1033ms the first time, about 850ms after). Is there a way to improve
the performance of the database? The update of the archive would take
about 6 hours ...
I've tried with .executeUpdate, PreparedStatement, modify value with
.updateRow... but the result is the same.
Before continuing, I would like to know if this execution time is normal
or is possible improve it, maybe setting some driver properties.
-Roberto
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
http://www.avast.com
Something truly strange Roberto, your findings are absolutly abnormal.
At this very moment I haven't elements enough to help you.
I can just suggest to use a transaction if you're executing more update statement: conn.setAutocommit(false) at the start and conn.commit() at the end (If you're in autocommit mode the execution time may be drammatically high because of IO)
I would need your critic code to be helpful. May you post it along?
cheers Marco
Last edit: Marco Amadei 2015-04-28
thanks, the problem was that. I had to disable autocommit. You save my day :)
Is possible make a donation to ucanaccess project?
-Roberto
It will be possible(I think not be able to continue without a bier-or two for day). But currently it isn't. Thank you!
Why in some cases when using conn.commit () I get an exception "net.ucanaccess.jdbc.UcanaccessSQLException: Unexpected page type 1"?
mmmmmm, it comes from jackcess, the underlying IO library.
Maybe something bad in your db format.
I would use the MS Access Compact and Repair tool and see if this solves the issue, before send to them the Exception stack-trace.
You may send it here too, it may be an inspiration source.
Last edit: Marco Amadei 2015-04-28