Hi all,
while trying the ORM side of sqlalchemy, I noticed a remarkable speed
difference
between using the ORM machinery and the "plain" db access.

The attached test consists of 1000 inserts and 1000 selects; its
purpose is
just to test the overhead of the data mapping system.

The ORM version takes about 160% more time than the plain version in
user-land
time, and 60% in wall clock time:

ORM
Starting test
Total time: 77.8519508839

real    1m18.526s
user    0m22.277s
sys     0m0.392s


PLAIN
Starting test
Total time: 47.6633858681

real    0m48.319s
user    0m8.605s
sys     0m0.216s


I'm using the trunk version of SA and PostgreSQL 8.1.4 (Ubuntu Edgy
package).

Is this difference to be expected? What can be done to reduce it, if
anything?

I attach three files:
- userhandling1.py (the plain version)
- userhandling2.py (the ORM version)
- test-userhandling.py (the test program)

Thanks in advance.

david


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to