Search code examples
google-cloud-sql

How to speed up insert in cloudsql


I can not change this global parameter in google cloud. set global innodb_flush_log_at_trx_commit = 0

How to speed up insert in cloudSQL?

I have tried use bulk insert and any other flags. But it dos not work.


Solution

  • You cannot change every parameter you want for Cloud SQL since it is a Google managed service. Anyway, the innodb_flsuh_log_at_trx_commit parameter should be kept to the value 1, in general, because it helps InnoDB for being ACID compliant. If you ever try to modify this parameter you risk loosing some data in your transactions.

    Going back to your issue, here you can find a set of tips for improving performance of your Cloud SQL instance.

    If you really want to have full control over your databases, you can always opt for setting your databases on a Compute Engine instance.