List:General Discussion« Previous MessageNext Message »
From:Bennett Haselton Date:October 30 2001 3:15pm
Subject:"ROW_FORMAT=compressed" has no effect on db file sizes
View as plain text  
I created one table with the command:

CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1),
birth DATE, death DATE, id INT UNSIGNED NOT NULL);

and another one with the command:

CREATE TABLE pet2 (name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1),
birth DATE, death DATE, id INT UNSIGNED NOT NULL) ROW_FORMAT=compressed;

and then populated both of them with 10,000 rows of data, from a file "pet.txt" with
10,000 lines of text, created with the perl script:
>>>
open(PET, "> pet.txt");
for (my $i = 1; $i <= 10000; ++$i)
{
	if ($i%100 == 0) { print $i, "\n"; }
	print PET "snort	bennett	mammal	m	1986-12-08	\N	$i\n";
}
close(PET);
>>>

But the files used to store data for both tables take up the same amount of disk space:
>>>
[root@server1 menagerie]# ls -l
total 912
-rw-rw----    1 mysql    mysql      360000 Oct 30 09:14 pet.MYD
-rw-rw----    1 mysql    mysql       82944 Oct 30 09:14 pet.MYI
-rw-rw----    1 mysql    mysql        8704 Oct 30 09:10 pet.frm
-rw-rw----    1 mysql    mysql      360000 Oct 30 09:20 pet2.MYD
-rw-rw----    1 mysql    mysql       82944 Oct 30 09:20 pet2.MYI
-rw-rw----    1 mysql    mysql        8704 Oct 30 09:20 pet2.frm
>>>

Did I do something wrong?

	-Bennett

bennett@stripped     http://www.peacefire.org
(425) 649 9024

Thread
"ROW_FORMAT=compressed" has no effect on db file sizesBennett Haselton30 Oct
  • Re: "ROW_FORMAT=compressed" has no effect on db file sizesDan Nelson30 Oct
    • Re: "ROW_FORMAT=compressed" has no effect on db file sizesBennett Haselton31 Oct
  • Linux VM on MySQL Servers...Luis Ferro31 Oct
    • Re: Linux VM on MySQL Servers...Jeremy Zawodny1 Nov