Quantcast
Channel: MySQL Forums - InnoDB
Viewing all articles
Browse latest Browse all 1954

Slow DELETE-Statement since update on 5.7 (no replies)

$
0
0
I have a MySQL 5.7 server with a table MEDIADATA with 2000 rows that contains one longblob:

`MEDIADATA` (
`id` bigint(20) NOT NULL,
`version` bigint(20) NOT NULL,
`crc32sum` bigint(20) NOT NULL,
`mediadata` longblob NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `crc32sum` (`crc32sum`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin


When I try to delete some records with:

DELETE FROM MEDIADATA
USING MEDIADATA
INNER JOIN (SELECT id FROM MEDIADATA WHERE id NOT IN (SELECT mediaData_id FROM MEDIA)) AS temptable
ON MEDIADATA.id = temptable.id;

it takes very long time to execute (up to two minutes).

The same DELETE-Statement on a MySQL 5.6 server with exactly the same database (schema and data) takes less than one second.

In both scenarios no row is actually deleted as the result of the JOIN is an empty table.

Is there any known change that might explain the difference between 5.6 and 5.7 regarding the execution time?

Viewing all articles
Browse latest Browse all 1954

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>