Re: [sqlalchemy] .count() hangs indefinitely

2016-11-06 Thread James Burke
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

Re: [sqlalchemy] .count() hangs indefinitely

2016-11-06 Thread James Burke
> > > 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

[sqlalchemy] .count() hangs indefinitely

2016-11-04 Thread James Burke
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 = session.query(Customer).filter(Customer.phone_number.contains([ message['metadata']['MIN']]))