MySQL 5.1 リファレンスマニュアル :: B Errors, Error Codes, and Common Problems :: B.1 Problems and Common Errors :: B.1.5 Query-Related Issues :: B.1.5.6 Deleting Rows from Related Tables
« B.1.5.5 Rollback Failure for Non-Transactional Tables

B.1.5.7 Solving Problems with No Matching Rows »
Section Navigation      [Toggle]
  • B.1.5 Query-Related Issues
  • B.1.5.1 Case Sensitivity in Searches
  • B.1.5.2 Problems Using DATE Columns
  • B.1.5.3 Problems with NULL Values
  • B.1.5.4 Problems with Column Aliases
  • B.1.5.5 Rollback Failure for Non-Transactional Tables
  • B.1.5.6 Deleting Rows from Related Tables
  • B.1.5.7 Solving Problems with No Matching Rows
  • B.1.5.8 Problems with Floating-Point Comparisons

B.1.5.6. Deleting Rows from Related Tables

If the total length of the DELETE statement for related_table is more than 1MB (the default value of the max_allowed_packet system variable), you should split it into smaller parts and execute multiple DELETE statements. You probably get the fastest DELETE by specifying only 100 to 1,000 related_column values per statement if the related_column is indexed. If the related_column isn't indexed, the speed is independent of the number of arguments in the IN clause.

Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved. Legal Notices
Top / Previous / Next / Up / Table of Contents
© 2010, Oracle Corporation and/or its affiliates