简体   繁体   English

MySQL在AWS RDS中插入缓慢

[英]MySQL Insert Slow in AWS RDS

I'm trying to INSERT/UPDATE and realized it's taking about 15 seconds. 我正在尝试INSERT / UPDATE,并意识到这大约需要15秒。

The table has only a few records (+/- 350 records) and is in an RDS instance db.t2.small 该表只有几条记录(+/- 350条记录),并且在RDS实例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: 我尝试使用REPAIR,但看到错误:

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 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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