Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 35.1Mb
PDF (A4) - 35.2Mb
Man Pages (TGZ) - 256.4Kb
Man Pages (Zip) - 361.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
Excerpts from this Manual

B.3.4.6 Deleting Rows from Related Tables

If the total length of theDELETE statement forrelated_table is more than 1MB (the default value of themax_allowed_packet system variable), you should split it into smaller parts and execute multipleDELETE statements. You probably get the fastestDELETE by specifying only 100 to 1,000related_column values per statement if therelated_column is indexed. If therelated_column is not indexed, the speed is independent of the number of arguments in theIN clause.