This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-15. For the latest, interactive version please visit https://mariadb.com/kb/.

Slow insert queries after upgrade

Hi all,

We have recently upgraded our MariaDB to 10.5.8. Since the upgarde one of our INSERT queries that uses a select to get the records started running incredibly slow (from a few seconds it now takes several minutes)! I have checked the parameter groups and everything seems the same with the previous version. The slow query looks like this:

INSERT INTO my_table (object_id, time_stamp, value) SELECT object_id, time_stamp, value FROM table1 WHERE time_stamp BETWEEN '2021-02-07' AND '2021-02-08'

The select itself is very quick so I dont understand why inserting is so slow. Other insert queries that we have have not been affected (on the contrary the speed increased on those) but theyare not using a select to get the data to be inserted. The table structure has not changed and the table is InnoDB.

Any input on this will be appreciated.

Thanks,

S.

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.