[sqlalchemy] Re: SQLAlchemy with MySQL on AWS Lambda is taking long time to truncate table

2022-12-13 Thread Chandra Prakash
I tried this, kept commit and close statements and removed dispose statement, but yet the problem is not solved, it's taking time to truncate the table. On Wednesday, 14 December 2022 at 05:19:27 UTC+5:30 yaakovb...@gmail.com wrote: > Is it possible your sessions hasn't committed the change /

[sqlalchemy] Re: SQLAlchemy with MySQL on AWS Lambda is taking long time to truncate table

2022-12-13 Thread Yaakov Bressler
Is it possible your sessions hasn't committed the change / closed the transaction? Also, I don't think dispose is helping you here. Consider removing it? How about modifying: def add_user(): session = Session() session.add(User(**{'user_id': 1, 'name': 'user name'})) session.commit(

[sqlalchemy] SQLAlchemy with MySQL on AWS Lambda is taking long time to truncate table

2022-12-13 Thread Chandra Prakash
On creating all tables using alembic for migrations and then truncate any empty table gets completed quickly, BUT once lambda function is triggered to insert some data in a table through SQLAlchemy ORM Session query (as given below) and then truncate the table takes very much time. Where is the