We test emission models of circum-nuclear dust torii around quasars, at low and high redshifts, by using a large collection of photometric data for an unbiased sample of 120 optically-selected objects with millimetric and sub-millimetric fluxes, including new unpublished data. Under the assumption that the dust is heated by a point-like source with a power-law primary spectrum, as defined by the observed optical-UV continuum, we infer the basic model parameters, such as dust masses, temperature distributions and torus sizes, by numerically solving the radiative transfer equation in the dust distribution. In addition to the substantiated statistics, an essential improvement over previous analyses comes from the use of optical-UV data to constrain the primary illuminating continuum, which is needed to estimate dust temperatures and sizes. Dependences of the best-fit parameters on luminosity and redshift are studied and the contribution of dust in the host galaxy to the observed fluxes is briefly mentioned. This analysis constrains the properties of the enriched interstellar medium in the galaxies hosting the quasars. The dust abundance does not display appreciable trends as a function of redshift, from z ~ 1 to almost 5, and shows that dust and metals are at least as, and often more, abundant at these early epochs than they are in local galactic counterparts. This evolutionary pattern is remarkably at variance with respect to what is expected for disk galaxies, like the Milky Way, slowly building metals during the whole Hubble time. It rather points in favour of a much more active phase of star-formation at early epochs, probably related to the formation of massive spheroidal galaxies.