Re: [sqlalchemy] Query compilation cost

2013-07-13 Thread Amir Elaguizy
Awesome Michael it has given a speedup actually outside of caching even, which is great. How do I do the equivelant of this though? compiled = stmt.compile() params = compiled.params # here we return the key as a long string. our key mangler # set up with the region will boil

Re: [sqlalchemy] Query compilation cost

2013-07-13 Thread Michael Bayer
On Jul 13, 2013, at 11:27 AM, Amir Elaguizy aelag...@gmail.com wrote: Awesome Michael it has given a speedup actually outside of caching even, which is great. How do I do the equivelant of this though? compiled = stmt.compile() params = compiled.params # here we return

[sqlalchemy] Query compilation cost

2013-07-12 Thread Amir Elaguizy
I'd like a way to avoid the cost of repeatedly compiling the same query, especially in the context of relationship caching. Specifically now that I have object caching in place, I have created my own keys where it is possible. However there are still some cases where I cannot. In these cases

Re: [sqlalchemy] Query compilation cost

2013-07-12 Thread Michael Bayer
On Jul 12, 2013, at 7:03 PM, Amir Elaguizy aelag...@gmail.com wrote: I'd like a way to avoid the cost of repeatedly compiling the same query, especially in the context of relationship caching. Specifically now that I have object caching in place, I have created my own keys where it is