Hi everyone, I would suggest adding a new command at the protocol level and use the same row/data protocol being used to return rows to instead send rows for bulk insert. This way the server gets them pre-parsed, we can use the same bits in the protocol library (just in reverse), and then clients can implement the interface any way they like (CSV, binary, ...). The command would take a table name as a parameter of where to insert and then just needs to verify types on the way in. We could also support parallel inserts by just using multiple commands inserting into the same table.
-Eric On Fri, Nov 28, 2008 at 06:51:53PM -0800, Jim Winstead wrote: > On Fri, Nov 28, 2008 at 6:41 PM, Brian Aker <[EMAIL PROTECTED]> wrote: > > Hi! > > > > On Nov 28, 2008, at 3:36 PM, Jim Winstead wrote: > > > >> in the way that the protocol is used to tell the client to send a > >> file. > > > > > > What would make for a better protocol? > > the problem, as i recall, is that what happens with LOAD DATA LOCAL > INFILE 'foo' is that the server sends a packet back to the client that > says "send the file named 'foo'". you don't have to think very hard to > find problems with that. > > > All we need, I believe, is the column headers and some sort of inline of the > > data. The difference between LOAD DATA and a typical INSERT is that LOAD > > DATA bypasses the parser. > > > > Other then that, same handler calls. > > an advantage to it being server-side is that it accessible from all > clients, and you don't have to do a straight load of the data, but you > can modify the data as it is going in. you can do all of that by > pre-processing the data with perl or something, but i simply have > found LOAD DATA LOCAL more convenient in many cases. > > i use LOAD DATA LOCAL more often for ad-hoc data loads than for > anything i do routinely. so performance isn't my concern, convenience > is. > > jim > > _______________________________________________ > Mailing list: https://launchpad.net/~drizzle-discuss > Post to : [email protected] > Unsubscribe : https://launchpad.net/~drizzle-discuss > More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

