use the sql to remove the dirty data and make the index works