[sqlalchemy] Simple select is really slow when executed via ORM

2011-08-12 Thread Massi
Hi everyone, I'm doing some test to evaluate the performance of querying with sqlalchemy via ORM. I wrote a simple script to measure the execution time of a simple select query made on relatively small table (300 000 records, 6 columns) in sqlite. Here is the script: from sqlalchemy import *

Re: [sqlalchemy] Simple select is really slow when executed via ORM

2011-08-12 Thread Michael Bayer
Here's a comparison that begins to be slightly fair regarding the work of fetching raw rows versus generating and identity-managing full object rows. On my mac the SQL query takes 7 seconds and the Session query 13.7, so twice as slow, rather than 20. The difference is we are actually