Can you please provide a simple example of what the stored procedure for solving N+1 looks like?
I cant use stored procedures mainly due to management concerns about portability, but am really curious how this N+1 case can be done using stored procedures.
Thanks,
Eric
Jeff Butler <[EMAIL PROTECTED]> wrote:
Agreed - stored procedures are great for things like this if the political and management environment supports using them. Mine doesn't, unfortunately :-(Jeff Butler
On 7/24/06, Larry Meadors <[EMAIL PROTECTED]> wrote:I am starting to sound like a broken record, but if you can do this
with a stored procedure, you'll get *much* better performance in cases
like this - at least 2x better, and depending on the database, even
more.
Larry
On 7/24/06, Jeff Butler <[EMAIL PROTECTED]> wrote:
>
> Not really. The recommended practice is to write a DAO method that will do
> this - like updateAuction(Auction auction). The DAO method should update
> each table individually with multiple calls to iBATIS for the different
> tables. This should all be in a single transaction too - either start a
> transaction in the DAO method, or start the transaction in the service layer
> if you have a distinct service layer.
>
>
> Jeff Butler
>
>
>
> On 7/24/06, Mississippi John Hurt < [EMAIL PROTECTED]> wrote:
> >
> > Hi,
> > Is there a way to update multiple tables for a single object in ibatis?
> Say you have a Auction object with a List of Bid objects. Could you do a
> mapping for an update similar to a resultmap for select? I'm thinking that
> even using ibatis, you'd just use individual updates as if you weren't using
> ibatis. Is that true? Thanks.
> >
>
>
Real people. Real questions. Real answers. Share what you know.
