On May 14, 2007, at 4:12 AM, Graham Stratton wrote:

>
> Hi,
>
> I'm getting some surprisingly poor performance from SQLAlchemy
> in .get() operations. They're typically taking about 100-200ms, though
> varying quite a lot.  Just doing engine.execute() on the echo()ed SQL
> takes about 10ms.  The query is not small, with a few LEFT OUTER JOINS
> to eagerly loaded attributes, but it's not massive.  As far as I can
> work out, the query generation is responsible for most of the extra
> time.

do you mean, the compilation of the Select object into a string ?   
extremely unlikely.   the main speed issue with get() is that of  
fetching rows from DBAPI and processing into object results, which  
goes up by a huge margin if you have a lot of eagerly loaded  
instances attached to the get.   the ORM has to create a copy of each  
object's attributes in memory in order to track attribute history as  
well as perform a lot of other bookkeeping.  what youre looking for  
is a second-level cache which is currently a RYO (roll-your-own)  
feature.




--~--~---------~--~----~------------~-------~--~----~
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