0

Our RDS instance is setup to handle 1000 Provisioned IOPS. This number is fine for most of the time. But at some point we need to run several insert operations (each inserting 2K records), our IOPS get very high and we start getting disk queue depth alerts. Does it make sense to break those inserts into smaller ones (less than a 1K records). Does it make sense to break those inserts into smaller ones or will it cause the IOPS to get even higher?

  • 1
    Inserting in bulk is the most efficient way to do it. However, if you don't mind the inserts taking a longer time, you could submit smaller batches and even "sleep" between inserts. Personally, I'd keep the bulk inserts -- especially if it's a batch job that runs at the same time every day so you know what to expect. – Colin 't Hart Mar 12 '15 at 12:21
  • Is the 2K rows in a single InnoDB transaction? I hope so, because there is some per-transaction I/O -- in addition to the per-row cost of doing an INSERT. Do you have more INDEXes than you need on the table? They cost, too. – Rick James Mar 12 '15 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.