Optimized Entry SQL functions