With on record removed

- also fixed TVP caching issue for multi db scenario