Optimized database calls