Subject | Re: Driver Speed Tests => Autocommit on/off when reading? |
---|---|
Author | Roman Rokytskyy |
Post date | 2002-10-17T20:45:36Z |
Hi,
to cache result set locally. If your result set is big you will get
memory problems. Number of network traffic still remains the same. If
you are ok with memory consumption, you can trun autocommit on. But in
this case you will have tx_start and tx_commit after each statement
execution. tx_start and tx_commit are expensive.
and do not keep track of changes in engine). Usually in databases with
optimistic concurrency control commit is cheap, rollback is expensive.
There must be an article on IBPhoenix.com about MGA architecture that
also explains this issue.
short as possible. Long transactions in MGA might cause bad effects.
Best regards,
Roman Rokytskyy
> So what is your advice when reading data regarding performance?Usually no. The reason is simple - when autocommit is on, driver has
> Should I use autocommit yes or no?
to cache result set locally. If your result set is big you will get
memory problems. Number of network traffic still remains the same. If
you are ok with memory consumption, you can trun autocommit on. But in
this case you will have tx_start and tx_commit after each statement
execution. tx_start and tx_commit are expensive.
> And if no, if I use a connection for reading only, should I commitSome time ago it was commit (now I spend most of my time in Java world
> or rollback when returning the connection?
and do not keep track of changes in engine). Usually in databases with
optimistic concurrency control commit is cheap, rollback is expensive.
There must be an article on IBPhoenix.com about MGA architecture that
also explains this issue.
> Or rollback and commit is not necessary when a connection is usedIt is necessary. It is recommended to keep transaction duration as
> for reading only (when no locking is used => for update close)?
short as possible. Long transactions in MGA might cause bad effects.
Best regards,
Roman Rokytskyy