Inserting the documents into history tables in async manner.