We investigate the ionospheric response to solar wind discontinuities as detected by the IE index computed from IMAGE ground magnetometers. The solar wind discontinuities include both sudden increases as well as decreases of the solar wind dynamic pressure, recorded by the SWEPAM instrument of the ACE spacecraft during the period 1998-2004. In our statistical study, we identify four categories of events: 1) sudden increases of the dynamic pressure with a simultaneous increase of the interplanetary magnetic field (IMF) magnitude; 2) sudden increases of the dynamic pressure accompanied with a simultaneous decrease of the IMF; 3) sudden decreases of the dynamic pressure accompanied with a sudden increase of the IMF; and 4) sudden decreases of the dynamic pressure with relatively steady IMF. We perform a superposed epoch analysis for the four event categories to distinguish the ionospheric response. We find that the IE index increases/decreases in response to the solar wind dynamic pressure increases/decreases regardless of the simultaneous change in the IMF or the amount of estimated input energy. We investigate the magnitude of the ionospheric response according to the IMF north-south direction, the dynamic pressure step size as well as the pressure level prior the dynamic pressure change. We find that the ionospheric result is augmented for larger pressure steps, while the prior IMF has a role only in some of the event categories. We also perform global MHD simulation runs to investigate the ionospheric dissipation rate during such solar wind discontinuities, and find that the simulation results are in good qualitative accordance with the observational statistical results.