Add db enable for stat

Add db-enable option for statistic.