List:General Discussion« Previous MessageNext Message »
From:Egor Egorov Date:November 26 2002 3:45pm
Subject:re: [MySQL v3.23.53a] BLOB Data and Table Size
View as plain text  
Pae,
Tuesday, November 26, 2002, 6:52:20 PM, you wrote:

PC> I have two tables containing a BLOB cloumn as;

PC> -- supposed to be able to handle up to about 16MB
PC> CRETAE TABLE gallery1 (
PC>     id    INTEGER,
PC>     title    VARCHAR(255),
PC>     mediumimage    MEDIUMBLOB
PC> );

PC> -- supposed to be able to handle up to about 4GB
PC> CRETAE TABLE gallery2 (
PC>     id    INTEGER,
PC>     title    VARCHAR(255),
PC>     largeimage    LONGBLOB
PC> );

PC> Both table show the size about 48KB initially.

PC> And I added a <16MB(about 7,863KB) image into the
PC> table, "gallery1" and a <4GB(about 11,620KB) into
PC> the table, "gallery2", respectively.

PC> The size of gallery1, i,e, "gallery1.db", shows 8,232KB
PC> and the size of gallery2, i.e., "gallery2.db", shows
PC> 11,712KB.

PC> Each table contains only one entry. And I deleted
PC> both entries from two tables. So both tables contain
PC> no entry.

PC> However, the size of tables remain same as after
PC> insertion made.

PC> Q: How come the size of table does not decrease
PC>     after deletion?

It's an expected behaviour. According to the MySQL manual:

     In MyISAM tables, deleted records are maintained in a linked list
     and subsequent INSERT operations reuse old record positions. To
     reclaim unused space and reduce file-sizes, use the OPTIMIZE
     TABLE statement or the myisamchk utility to reorganise tables.
     OPTIMIZE TABLE is easier, but myisamchk is faster.




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   Egor.Egorov@stripped
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com



Thread
[MySQL v3.23.53a] BLOB Data and Table SizePae Choi26 Nov
  • Re: [MySQL v3.23.53a] BLOB Data and Table SizeKeith C. Ivey26 Nov
    • Re: [MySQL v3.23.53a] BLOB Data and Table SizePae Choi26 Nov
      • Re: [MySQL v3.23.53a] BLOB Data and Table SizePaul DuBois26 Nov
    • Re: [MySQL v3.23.53a] BLOB Data and Table SizePae Choi26 Nov
  • re: [MySQL v3.23.53a] BLOB Data and Table SizeEgor Egorov26 Nov
  • Re: [MySQL v3.23.53a] BLOB Data and Table SizeJohn Ragan26 Nov