repo.db tunning
(cherry picked from commit 90f95d4cc62c6e68dce8fd2758f34d33c1a2f29d)