Kdb handling optimized