namco
namco

Reputation: 6338

Records deleted but the size of the table doesn't change

I have a MySql table (MyISAM) with 25.000 records and 1.8 MB size.
The structure of the table is like this

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`))

When I try to execute SQL command to delete some rows

DELETE FROM t_pers_info WHERE exam_kod=1000

it deletes the records but the size of the table doesn't change.

Upvotes: 0

Views: 261

Answers (2)

Andrey Frolov
Andrey Frolov

Reputation: 1534

Try to optimize your table http://dev.mysql.com/doc/refman/5.0/en/optimize-table.html

Upvotes: 1

triclosan
triclosan

Reputation: 5714

try to do

OPTIMIZE TABLE `t_prs_info`

after deleting

Upvotes: 1

Related Questions