bin/cubicweb-ctl
author Philippe Pepiot <philippe.pepiot@logilab.fr>
Tue, 10 May 2016 16:09:34 +0200
changeset 11351 97882e99138d
parent 0 b97547f5f1fa
child 12253 9165f4b7426b
permissions -rwxr-xr-x
[server] Improve massive deletion of entities sqlserver is limited on the "IN" array size and produce an error "The query processor ran out of internal resources and could not produce a query plan". The exact limitation is unclear but can occur with > 10000 item in the array. See https://support.microsoft.com/en-us/kb/288095 Now we process the deletion by batch of 10000, some quick benchmarks show that there is no performance impact: delete_in(50000): 46.765182972 delete_in_batch(50000): 46.3242430687 delete_in(100000): 62.2969429493 delete_in_batch(100000): 61.8402349949

#!/usr/bin/env python
from cubicweb.cwctl import run
import sys
run(sys.argv[1:])