Hi, I am using sqlalchemy core with the mysql dialect. Mysql supports
DELETE with ORDER BY and LIMIT:
DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM tbl_name
[PARTITION (partition_name,...)]
[WHERE where_condition]
[ORDER BY ...]
[LIMIT row_count]
However, I can't seem to figure out how to do this via sqlalchemy core. I
have a really large table from which I need to garbage-collect old rows now
and then. When I try to do it all in one operation, I end up getting "Lock
wait timeout exceeded; try restarting transaction", so I wanted to take
advantage of order_by and limit to do this incrementally, but mysqlalchemy
won't let me.
Please help.
Thank you,
Vitaly
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.