Re: [sqlalchemy] SQLTap 0.3.10 released

2015-10-01 Thread George Reilly
On Mon, Sep 28, 2015 at 1:04 AM, David Allouche wrote: > On 28 Sep 2015, at 05:21, George V. Reilly > wrote: > > SQLTap is a very useful library that helps you in profiling SQLAlchemy > queries. It helps you understand where and when SQLAlchemy

[sqlalchemy] Capturing query parameters

2015-09-18 Thread George Reilly
I find [SQLTap](http://sqltap.inconshreveable.com/) invaluable for profiling SQLAlchemy queries. Currently, I've reduced one operation in our system from nearly 12,000 queries to 800, and I'm not finished yet. SQLTap listens for the before_execute and after_execute events. In after_execute, it

Re: [sqlalchemy] Capturing query parameters

2015-09-18 Thread George Reilly
On Fri, Sep 18, 2015 at 1:33 PM, Mike Bayer <mike...@zzzcomputing.com> wrote: > > On 9/18/15 3:22 PM, George Reilly wrote: > > I find [SQLTap](http://sqltap.inconshreveable.com/) invaluable for > profiling SQLAlchemy queries. Currently, I've reduced one operation in our

[sqlalchemy] Recovering from StaleDataErrors

2015-04-19 Thread George Reilly
I ran into a `StaleDataError` from PostgreSQL the other day when a client app sent us two update requests back-to-back without waiting for the first request to send a response. Given class Mood(Base): id = Column(BigInteger, primary_key=True, autoincrement=False, nullable=False)

[sqlalchemy] deleting from a many-to-many association table

2014-05-19 Thread George Reilly
(Apologies if this is a dupe. I posted it twice via the GG webpage and it never showed up.) I've spent time unsuccessfully trying to fix some problems with a many-to-many relationship and lazy joins. Here's a simplified repro: #!/usr/bin/env python # -*- coding: utf-8 -*- import