1
What are the reasons that the simple Insert described below would take so long that it even gives timeout on the server?
INSERT INTO wkvmk_postmeta (post_id, meta_key, meta_value) VALUES(904, '_order_key', '')
Table structure:
+------------+---------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+---------------------+------+-----+---------+----------------+
| meta_id | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
| post_id | bigint(20) unsigned | NO | MUL | 0 | |
| meta_key | varchar(255) | YES | MUL | NULL | |
| meta_value | longtext | YES | | NULL | |
+------------+---------------------+------+-----+---------+----------------+
Amount of records already recorded: 5729
Server type: MariaDB
Server version: 10.0.24-MariaDB - MariaDB Server
Protocol version: 10
Error message: ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
Making Insert directly with a client on the console (mariadb-client-10.0
)
Are you using any language? the amount of Insert then is 5729 lines?
– novic
@Virgilionovic edited the question answering your questions :)
– Samuel Fontebasso