Fix namespace error in previous potential performance improvement

The file was namespaced, so the call to DB needs to be at the root level.