[sqlalchemy] FYI: Put up a blog post on how to manage PostgreSQL Materialized Views using SQLAlchemy

2016-01-07 Thread Jeff Widman
PostgreSQL materialized views have been extremely useful as a caching layer for some of my projects. They're fast, easy to setup, don't require extra infrastructure, and easy to refresh. However, it took me forever to figure out how to manage them using SQLAlchemy, so I wrote it up in the hopes of

Re: [sqlalchemy] expired model does not reload relationships on get()

2016-01-07 Thread Mike Bayer
On 01/07/2016 08:04 PM, Christopher Lee wrote: > > I have a simple setup where I create two Nodes connected by an Edge, > where the Edge should be eagerly loaded when the parent is loaded. If I > query the Node with a get(), it issues a select to refresh it, but then > if I access its children,

[sqlalchemy] totally shifted to sql expression language, any performance tips

2016-01-07 Thread Krishnakant
Dear all, I have totally shifted to using sql expression in alchemy. I am going to retrieve huge sets of data, about 5 + records with 7 columns each. The result might contain jsonb data (I use postgresql 9.4 with Psycopg2 ). Insertions are not a problem because they are not so heavy and not

[sqlalchemy] expired model does not reload relationships on get()

2016-01-07 Thread Christopher Lee
I have a simple setup where I create two Nodes connected by an Edge, where the Edge should be eagerly loaded when the parent is loaded. If I query the Node with a get(), it issues a select to refresh it, but then if I access its children, it issues a second get(). This behavior did not used to oc

Re: [sqlalchemy] Bulk insertion with null values

2016-01-07 Thread Tobias
Thanks for your fast response! On Wednesday, January 6, 2016 at 10:42:59 PM UTC+1, Michael Bayer wrote: > > I don't have a solution for that at the moment other than to use a > straight Core insert, if there aren't other complicating factors. > In my case I am having a model with inheritance and