[sqlalchemy] Re: Relative speed of ORM vs. direct insertions (on simple tables)

2009-04-08 Thread Gregg Lind
Some followups: Python 2.4.3 on 64-bit linux. Timings are near identical in SA 0.5.2 and 0.5.3. On Apr 8, 9:57 am, Gregg Lind gregg.l...@gmail.com wrote: Good morning! I hope I'm not tipping any sacred cows here, but for simple SqlA objects, it seems to be a heckuva lot faster to just

[sqlalchemy] Re: Relative speed of ORM vs. direct insertions (on simple tables)

2009-04-08 Thread Michael Bayer
Gregg Lind wrote: Good morning! I hope I'm not tipping any sacred cows here, but for simple SqlA objects, it seems to be a heckuva lot faster to just insert into the table directly (using SqlA expression language) than to insert the objects via session.flush(). In the attached tests, I'm

[sqlalchemy] Re: Relative speed of ORM vs. direct insertions (on simple tables)

2009-04-08 Thread Gregg Lind
Thank you for the excellent and comprehensive answer! I didn't realize exactly how much work the session object does As per your advice, I have taken steps to reduce the size of my session object, and things run much more quickly now. On Wed, Apr 8, 2009 at 12:50 PM, Michael Bayer