upload optimisation into DB