Optimized DB access.