  The restricted optical sum rule and its dependence on the temperature, a
superconducting gap and the cutoff energy have been investigated. As known this
sum rule depends on the cutoff energy and the relaxation rate even for a
homogeneous electron gas interacting with impurities or phonons. It is shown
here that additional dependence of the spectral weight on a superconducting gap
is very small in this model and this effect disappears totally when the
relaxation rate is equal zero. The model metal with a single band is considered
in details. It is well known that for this model there is the dependence of the
sum rule on the temperature and the energy gap even in the case when the
relaxation is absent. This dependence exists due to the smearing of the
electron distribution function and it is expressed in the terms of Sommerfeld
expansion. Here it is shown that these effects are considerably smaller than
that of related with the relaxation rate if the band width is larger than the
average phonon frequency. It is shown also that the experimental data about the
temperature dependence of the spectral weight for the high- materials can be
successfully explained in the framework approach based on the temperature
dependence of the relaxation rate
