AWS RDS Slow Insert

Question:

I have a question regarding the insert of rows in RDS.
I am inserting in that example 301119 records in 1 table.

Here my log on those inserts batch :

The query is a straightforward batch insert in 1 table.

My local is not very fast and those results are quite weird … it takes 12 times more to run the same inserts in AWS … So, there is something wrong … It that a configuration problem or other ?

Some pointers would be very welcome 🙂 🙂

Thank you !

Answer:

So, I figured it out ! After searching and tweaking the configuration, we were around 300 Inserts per Seconds, we disabled the innodb_flush_log_at_trx_commit (1 -> 0) and the sync_binlog (1 -> 0), and we went up to 1500-2000 Inserts per Second !!
Since we are ok losing the last transaction / commit if the db crash so we went with and it is now blazing fast !!

Hopes it helps some of other people that are having the same issue !

Leave a Reply