我有一个包含25.000条记录和1.8 MB大小的MySql表(MyISAM) 表的结构就像这样
CREATE TABLE `t_prs_info` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`exam_kod` MEDIUMINT(10) UNSIGNED NOT NULL,
`mss` SMALLINT(5) UNSIGNED NOT NULL,
`grp` VARCHAR(3) NOT NULL,
`class` VARCHAR(2) NOT NULL,
`gp` VARCHAR(1) NOT NULL,
`vrnt` VARCHAR(1) NOT NULL,
`xdil` VARCHAR(3) NOT NULL,
`cns` VARCHAR(1) NOT NULL,
`name` VARCHAR(14) NOT NULL,
`surname` VARCHAR(14) NOT NULL,
`cl_kod` VARCHAR(10) NOT NULL,
`prs_kod` VARCHAR(10) NOT NULL,
`phone` VARCHAR(10) NOT NULL,
PRIMARY KEY (`id`))
当我尝试执行SQL命令删除某些行时
DELETE FROM t_pers_info WHERE exam_kod=1000
删除记录,但表的大小不会改变。
答案 0 :(得分:1)
尝试做
OPTIMIZE TABLE `t_prs_info`
删除后
答案 1 :(得分:1)