DB connect performance fix