ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <larry.mead...@gmail.com>
Subject Re: Statement Caching Question
Date Tue, 11 Nov 2008 13:30:17 GMT
If you commit every few hundred rows, it will probably work for you...

>From a more practical perspective: If you are constructing all of the
sql in java already, what's the point of using ibatis here? Why not
just use straight JDBC for this one process? If you use the template
approach that Spring does for JDBC, it's pretty simple code.

Larry


On Tue, Nov 11, 2008 at 3:44 AM, Young, Alistair
<alistair.young@logica.com> wrote:
> We have a big loop in which we're using iBATIS to insert many rows into a
> number of database tables.  Unfortunately, for various pragmatic reasons,
> the underlying SQL map is using the $ notation for substitution.  So it's
> something fairly unpleasant like:
>
> INSERT INTO $table$ ($columns$) VALUES ($values$)
>
> Of course, this means that each insert is considered a unique statement and,
> with statement caching enabled, we eventually get an error from
> our database:
>
> ORA-1000 maximum open cursors exceeded
>
> If we disable statement caching (in our SqlMapConfig file), then the problem
> goes away - but 99.9% of the time we're running "proper" queries and this
> seems like a sledgehammer to crack a nut.
>
> Is it possible to disable statement caching temporarily?  Or can somebody
> suggest another solution?
>
> Thanks,
>
>
> Alistair.
> This e-mail and any attachment is for authorised use by the intended
> recipient(s) only. It may contain proprietary material, confidential
> information and/or be subject to legal privilege. It should not be copied,
> disclosed to, retained or used by, any other party. If you are not an
> intended recipient then please promptly delete this e-mail and any
> attachment and all copies and inform the sender. Thank you.

Mime
View raw message