Grails Bulk updates
if you have a bulk operation: delete or update you can set the flush so it will occur every 1000 records updated.
def commitEvery = 1000
Domain.list().eachWithIndex{ obj, index ->
obj.property = new value
obj.save flush:0 == index % commitEvery
}
session = sessionFactory.getCurrentSession()
session.clear()