Reduce number of exclusive locks of case database acquired