Re: Bulk inserts

2005-11-03 Thread Larry Meadors
I think I'd look for a native database tool for this - most vendors provide bulk-loading tools. I think iBATIS is cool, but a golden hammer it isn't. ;-) Larry On 11/3/05, Paul Benedict <[EMAIL PROTECTED]> wrote: > How does it compare to bulk insert? It's faster. > Making 1000 round trips to th

Re: Bulk inserts

2005-11-03 Thread Paul Benedict
How does it compare to bulk insert? It's faster. Making 1000 round trips to the database is slower than 1. Try it out on your database. If it doesn't work, then you must do a for loop. --- Michael Campbell <[EMAIL PROTECTED]> wrote: > On 11/3/05, Paul Benedict <[EMAIL PROTECTED]> > wrote: > > Ye

Re: Bulk inserts

2005-11-03 Thread Jeff Butler
DB2 supports this syntax.   Jeff Butler  On 11/3/05, Michael Campbell <[EMAIL PROTECTED]> wrote: On 11/3/05, Paul Benedict <[EMAIL PROTECTED]> wrote: > Yes,>> SQL has a notation to INSERT multiple entries at once.> What you want to do is build a statement like the> following:>> INSERT INTO fruit (i

Re: Bulk inserts

2005-11-03 Thread Michael Campbell
On 11/3/05, Paul Benedict <[EMAIL PROTECTED]> wrote: > Yes, > > SQL has a notation to INSERT multiple entries at once. > What you want to do is build a statement like the > following: > > INSERT INTO fruit (id, name) VALUES (0, 'Pear'), (1, > 'Apple'), (2, 'Peach') Is that standard ANSI SQL? I k

RE: Bulk inserts

2005-11-03 Thread Zsolt
Paul, How does it compare to batch processing? Zsolt >-Original Message- >From: Paul Benedict [mailto:[EMAIL PROTECTED] >Sent: Thursday, November 03, 2005 8:44 AM >To: user-java@ibatis.apache.org >Subject: Re: Bulk inserts > >Yes, > >SQL has a notation to INSE

Re: Bulk inserts

2005-11-02 Thread Paul Benedict
Yes, SQL has a notation to INSERT multiple entries at once. What you want to do is build a statement like the following: INSERT INTO fruit (id, name) VALUES (0, 'Pear'), (1, 'Apple'), (2, 'Peach') Use the tag to build the dynamic list at the end. In this example, the GroceryBag object has a pro

Re: Bulk inserts

2005-11-02 Thread Sheshadri Patel
On 11/3/05, Steven Pannell <[EMAIL PROTECTED]> wrote: Hi,Is there a faster way of performing bulk inserts?currently I do something like: for(int i=1;i < list.size(); i++) {   MyObject object = list.get(i);   sqlMapClient.insert("myInsert", object);}This seems to t

Bulk inserts

2005-11-02 Thread Steven Pannell
Hi, Is there a faster way of performing bulk inserts? currently I do something like: for(int i=1;i < list.size(); i++) { MyObject object = list.get(i); sqlMapClient.insert("myInsert", object); } This seems to take forever! Is is possible to pass the com