Database timeout fix for large lists