T
Size: a a a
T
T
K
T
K
K
T
synchronize_session=False
чтобы не делался селект и session.expire_all()
для очистки кэшаK
while True:
objs =query().all()
session.delete(objs)
synchronize_session=False
T
synchronize_session=False
T
T
synchronize_session=False
False - don’t synchronize the session. This option is the most efficient and is reliable once the session is expired, which typically occurs after a commit(), or explicitly using expire_all(). Before the expiration, objects may still remain in the session which were in fact deleted which can lead to confusing results if they are accessed via get() or already loaded collections.
T
S
АП
V
S
I
T
АП
T