Re: [sqlalchemy] Optimize SQLAlchemy query

2017-06-30 Thread Mike Bayer
On Fri, Jun 30, 2017 at 8:56 AM, Simon King wrote: > Your "sql time" measurement only includes the time it takes to send > the query to the database. I don't think it includes the time that the > database has to evaluate the query and return the rows. To measure > that,

Re: [sqlalchemy] Optimize SQLAlchemy query

2017-06-30 Thread Simon King
On Fri, Jun 30, 2017 at 12:44 PM, mvidalgarcia wrote: > Hi, I'm performing a query to some data models but the ORM response time > looks much higher compared to the SQL one. I have a script to reproduce the > problem here. > Currently getting values like > >> sql time:

[sqlalchemy] Optimize SQLAlchemy query

2017-06-30 Thread mvidalgarcia
Hi, I'm performing a query to some data models but the ORM response time looks much higher compared to the SQL one. I have a script to reproduce the problem here . Currently getting values like sql time: 0.068972826004 >