Further optimisation on inserting/updating relative provenance