Right, INSERT in general doesn't support bulk inserts, but MySQL specifically does. MySQLdb generates an extended, single insert statement when you use executemany().
Anyway, it makes sense that the ORM layer wouldn't know how to generate bulk inserts for just on engine. I'll just have to drop back to raw SQL for that part of my application. Thanks! David Howell On Mon, Aug 31, 2009 at 9:12 PM, Mike Conley<mconl...@gmail.com> wrote: > >> > >> > people = [Person('Mick Jagger'), Person('Keith Richards')] >> > s.add_all(people) >> > s.commit() >> INSERT INTO person (name) VALUES (('Mick Jagger'), ('Keith Richards')) > > I could be wrong for some database engine, but INSERT generally does not > support a bulk insert mechanism like this. The only "bulk" insert capability > is the INSERT ... SELECT FROM syntax. > > DB API's, such as the Python DBAPI executemany() or SQLAlchemy, accept > something like a bulk insert, but actually generate multiple insert > statements. > > -- > Mike Conley > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---