The presence of trapped ions in electron storage rings causes considerable degradation in the performances of the beam, such as increase in beam size, reduction in beam lifetime, shifting of betatron tune, beam instabilities etc. This paper discusses the effects of ion trapping and its mitigation in Indus-2 electron storage ring. Ion-induced instability generating partial beam loss is one of the main barriers in higher beam current accumulation in any electron storage ring. Though there are several techniques to clear the ions from the electron beam path, in Indus-2, it is addressed mainly by filling the storage ring in partial bunch filling pattern. In order to improve the electron beam performance and to mitigate the ion-related problem, a suitable bunch filling pattern has been determined. The theoretical prediction and the result of optimal bunch filling pattern are presented in this paper.