[Koha] Truncating the nozebra table in koha DB

Chris Cormack chris at bigballofwax.co.nz
Mon Sep 5 05:01:01 NZST 2011


On 5 Sep 2011 02:53, "LAURENT Henri-Damien"
<henridamien.laurent at biblibre.com> wrote:
>
> Le 02/09/2011 21:58, Robin Sheat a écrit :
> > Op zaterdag 3 september 2011 01:35:42 schreef LAURENT Henri-Damien:
> >> check that the table is MyISAM and not innodb, unless you want to keep a
> >> huge innodb file......
> >
> > Alternately, use innodb_file_per_table
> >
> > http://dev.mysql.com/doc/refman/5.5/en/innodb-multiple-tablespaces.html
> Well, even with Innodb_file_per_table, the innodb data files are not
> resized on truncation. For instance, if your session or zebraqueue file
> grow to 1 Million entries, and taking up to 1 G for data, then
> truncating would not change that file size. This can be considered as a
> problem.
> Since zebraqueue or sessions are tables without external constraints, I
> would consider it safer to have them in MyIsam.

Ahh but it does allow to reclaim the space, if you read the page Robin
linked to, thats one of the reasons to use it. It is also the reason
we use it.

After 5.1 it will reclaim the size automatically,
http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-other-changes-truncate.html

Prior to 5.1 you need to run the  OPTIMIZE TABLE command after your
truncate to reclaim it.

Chris


More information about the Koha mailing list