简体   繁体   中英

MySQL Insert Slow in AWS RDS

I'm trying to INSERT/UPDATE and realized it's taking about 15 seconds.

The table has only a few records (+/- 350 records) and is in an RDS instance db.t2.small

Table:

CREATE TABLE `ajustes` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `tipo_id` int(10) unsigned DEFAULT '1',
  `nome` varchar(255) NOT NULL DEFAULT '',
  `valor` text NOT NULL,
  `array` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `modified` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  PRIMARY KEY (`id`),
  KEY `tipo_id` (`tipo_id`),
  KEY `nome` (`nome`)
) ENGINE=InnoDB AUTO_INCREMENT=351 DEFAULT CHARSET=latin1;

I do not even know where to begin with. I tried to use REPAIR but see the error:

The storage engine for the table doesn't support repair

I disabled two parameters and it works:

sync-binlog = 0 
innodb_flush_log_at_trx_commit = 0 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM