you are right,
the generated sql is fast,  but the "fetching from results" is slow
due the large ammount of columns (at least 100).

I don't know now what to use :/
generaly i will use all of the columns that i fetch, including related
objects, so everything is needed.

any sugestions?

On 16 Paź, 23:03, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On Oct 16, 2008, at 1:23 PM, g00fy wrote:
>
>
>
> > I do have correct results, but this is veryslow.
> > I assume that I have to query(Model) whitout any relations
> > and then eagerload or join or whatever that will make this work for
> > me.
>
> > Am i right that mapper's lazy=False is not good for this situation ?
>
> lazy=False specifically means, "join to related tables automatically,  
> to enable population of related elements and collections" - it means  
> you'd like eager loading to take place in all cases.   So if you have  
> slowness which is due to many secondary SELECT statements being issued  
> each time a related attribute is first accessed, its very useful.  I  
> would just suggest that using the eager load feature on a per-Query  
> basis, i.e. via query.options(eagerload(...)), would give you finer  
> grained control over when this feature is used.
>
> if OTOH the slowness is due to an enormous collection of elements  
> which load every time when eager loading is used, and you'd rather not  
> load this collection in, then you would *not* want to use eager  
> loading.  If you do need access to elements of a very large  
> collection, there are other options which can help with this.
>
> what is common here is that you need to understand the source of your  
> application's slowness in order to determine the best action to take.
--~--~---------~--~----~------------~-------~--~----~
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