Partitioned Table Service
Remove supporting specific partition options using the PARTITION term, which will take a listing of the comma-es of 1 or higher surfaces otherwise subpartitions (or both) where to choose rows to get fell. Given a beneficial partitioned table t having a good partition called p0 , performing the fresh declaration Delete Out-of t PARTITION (p0) comes with the same influence on the dining table since performing Transform Dining table t TRUNCATE PARTITION (p0) ; in both cases, every rows within the partition p0 is fell.
PARTITION can be used along with a WHERE condition, in which case the condition is tested only on rows in the listed partitions. For example, DELETE FROM t PARTITION (p0) WHERE c < 5 deletes rows only from partition p0 for which the condition c < 5 is true; rows in any other partitions are not checked and thus not affected by the DELETE .
The brand new PARTITION clause can also be used from inside the several-desk Remove comments. You can use to one option for every single dining table entitled from the Away from alternative.
If you erase the latest row that has the most really worth to have an AUTO_INCREMENT column, the benefits isn’t used again to have good MyISAM otherwise InnoDB table. For people who erase every rows about dining table that have Erase Regarding tbl_name (versus an in this clause) in the autocommit function, brand bicupid new sequence initiate more for all storage motors except InnoDB and you will MyISAM . You will find some exceptions to that behavior to possess InnoDB tables, because the chatted about in the Section 14.six.1.6, “AUTO_INCREMENT Handling during the InnoDB”.
To possess MyISAM tables, you could specify a car or truck_INCREMENT second line from inside the a multiple-line trick.