How it works...

In order to create multiple records in a batch, you need to pass value dictionaries in the form of a list to create new records. This will automatically manage batch-creating the records. When you create records in a batch, internally doing so will insert a query for each record. This means that creating records in a batch is not done in a single query. This doesn't mean, however, that creating records in a batch does not improve performance. The performance gain is achieved through batch-calculating computing fields.

Things work differently for the write method. When you perform a write on multiple records, this is done in a single query. In the create method, it is possible to pass different values for records, but in the write method, you can only use batch writing if you want to write the same values in all records.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset