I am using SQlAlchemy. I want to delete all the records efficiently present in database but I don't want to drop the table/database.
I tried with the following code.
con = engine.connect() trans = con.begin() con.execute(table.delete()) trans.commit()
It seems, it is not the very efficient one since I am iterating over all table present in the database. Can some one suggest me the better and efficient way of doing this?
Any kind of help greatly appreciated here.