optimized DB access