Thanks Mike for your response.
The query is run against a staging db and the table only contains some 500
records.
But I will check the query as you have suggested to see what is going on.
Cheers
>
>
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
On 11/04/2016 04:13 AM, James Burke wrote:
Hi All,
I've run into a odd problem, where calling the count function hangs my
code indefinitely. The odd thing is it was working until recently, so
I'm a little confused.
|
customer
you're using left outer join to locate rows in A for which there is
missing a row in B. the more idiomatic SQL for this is:
UPDATE a SET a.y=1 WHERE NOT EXISTS (SELECT * FROM b WHERE a.x = b.x)
works on any DB and performs better too.
On 11/05/2016 09:38 PM, T Johnson wrote:
How do I do
On 11/05/2016 08:45 PM, Yegor Roganov wrote:
Thank, I haven't yet figured out how to make your code more general
(without having to specify 'user_id'), but I think it can be done.
In the meantime I came up with a somewhat gross solution of my own.
The idea is to declare relation as
>
>
>
Thanks for your reply Simon.
- I am using Postgresql database
- Running the SQL generated by SQL Alchemy in Postgres also hangs.
- There is no traceback.
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please