Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Inserting and updating records is really slow. Can it go any faster?

0
Posted

Inserting and updating records is really slow. Can it go any faster?

0

The insert and update operations are actually very fast, however during large batches of database changes most of the work is spent managing transaction and index changes. One way to improve insert and update performance is to turn auto-commit off (it is on by default) and committing the entire batch of insert/update operations in one go. Using this strategy there will be less overhead for index/transaction maintenance and all transaction data is flushed to disk in a single disk write. The overhead of a transaction commit can also be lessened if the ‘dont_synch_filesystem=enabled’ configuration property is present in the configuration file. Enabling the ‘dont_synch_filesystem’ property will prevent the engine waiting for the result of a commit to be synchronized with the disk. The downside to enabling this property is if the operating system crashes after a commit there is a greater chance of losing the data that was committed in the transaction.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.