[sqlalchemy] More efficient Insert mechanism

2010-02-01 Thread matiskiva
Hello, I am working on an application that inserts ~3 rows. Each of them with a self-generating column (auto increment) I have them all in a list, and I perform a session.add_all(list) My problem is that the insert process is extremely slow. I inspected the SQL queries and saw that for every

[sqlalchemy] Re: releasing eager loaded resources

2010-02-01 Thread matiskiva
Just to skip the newbie replies :) I attempted to go over the "rects" collection and expunge all the items. This direct approach didn't work. Mati On Jan 31, 11:01 am, matiskiva wrote: > Hello all, > I have an application that loads many "Detection" objects, eac

[sqlalchemy] releasing eager loaded resources

2010-01-31 Thread matiskiva
Hello all, I have an application that loads many "Detection" objects, each of them having thousands of "Rect" objects, loaded with eager loading. I am performing some calculation on the rects and saves the result, along with the Detection objects. But than I am stuck with all the Rect objects, taki

[sqlalchemy] Better eager loading

2009-11-01 Thread matiskiva
Hi all, I have a database table that defines polymorphism and another table that has a foreign key to the original. And in formallity: ## defines the ResourceDB, and it's polymorphism speicfic kind FileDB mapper (ResourceDB,_resources_table,polymorphic_on=_resources_table.c.type,properties= {

[sqlalchemy] too eager loading

2009-08-17 Thread matiskiva
Hi, Sorry for the stupid Subject, i just couldn't resist myself. I am a veteran SQL developer and new to SQLAlchemy, so i find myself often inspecting the generated SQL statements and thinking oh-my-god, this needs to change. Specifically, i came across an instance where multiple eager loading us