a little speed tweak here, setting "SET FOREIGN_KEY_CHECKS = 0" *before* clearing...
[koha_gimpoz] / virtualshelves /
drwxr-xr-x   ..
-rwxr-xr-x 5112 addbybiblionumber.pl
-rwxr-xr-x 1228 shelves.pl
-rwxr-xr-x 9036 shelves.pl.old