[sqlalchemy] Re: duplicated sql ? - why?, speeding up relations (slow)

2008-10-16 Thread Michael Bayer
On Oct 16, 2008, at 12:31 PM, g00fy wrote: I have loads of related fields in my model. I set up lazy = False where i had to and i don't know why SA keeps duplicating (aliasing) my tables, so i fetch my data twice (2 times more column that i realy need) i send my model and mappings and

[sqlalchemy] Re: duplicated sql ? - why?, speeding up relations (slow)

2008-10-16 Thread g00fy
So in simple words, how do I speed this up? On 16 Paź, 18:42, Michael Bayer [EMAIL PROTECTED] wrote: On Oct 16, 2008, at 12:31 PM, g00fy wrote: I have loads of related fields in my model. I set up lazy = False where i had to and i don't know why SA keeps duplicating (aliasing) my

[sqlalchemy] Re: duplicated sql ? - why?, speeding up relations (slow)

2008-10-16 Thread Michael Bayer
On Oct 16, 2008, at 1:23 PM, g00fy wrote: I do have correct results, but this is very slow. 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

[sqlalchemy] Re: duplicated sql ? - why?, speeding up relations (slow)

2008-10-16 Thread g00fy
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ź,