Log to DBPerformance when queries affect many rows

Change-Id: If82b596187b638888760f800bba2fea20fc7ae8a