If the filling is too close to the nerve, it may get infected slowly. Dentists can't predict the time frame for the tooth to become infected. If infected, you may experience a throbbing pain or a dental abscess.