I will be having around 15 – 20 datasets to which at a time one value will be written . The data that needs to be written is a c++ object . Which approach is better in terms of performance and efficiency ?
1. For each write , open the dataset , write the data and close the dataset
2. Open the dataset once before the write starts , complete writing of the entire data and then close the dataset at the end .