experimental SQL scripts for clean-up procedure optimization