[Migration] reset cached db queries

Long running migrations otherwise continue to consume huge amounts of memory
for (unncessarily) cached queries
[Toplist] add DB indexes