check db loop search