Subject | Re: [Firebird-Java] jabird / Select / Update |
---|---|
Author | the_a_rioch |
Post date | 2012-11-22T12:16:57Z |
> >> will it re-create and re-prepare update statement on every call to update the row ? or will it be able to cache one prepared update statement and only substitute new parameters during the whole loop ?Which in turn would encourage that lazy approach. Should such style be encouraged or discouraged ?
> >
> > Former - on each row application might update different rows and we want
> > to change only them. So the update statement is re-prepared each time.
>
> Looks like something that could be improved by only re-preparing if the
> statement is different.
You would still waste time on comparing "what had changed" between iterations.
You would probably loose ability of bi-transactional work (while you can add some auxUpdatingTransaction field you would hardly make it reliable in all those automagic scenarios).
So while this can be cached, IMHO in this regard "faster" means really "worse".
----
I'm curious if JayBird could provide special kind of JDBC transaction splitting into two FB Transactions under the hood ? :-)