changed to use actual db for a big overnight clean of old unneeded rows