[Koha-devel] Cleaning up...

Michael Hafen michael.hafen at washk12.org
Fri Sep 11 19:02:02 CEST 2015


I would suggest the cleanup_database.pl script in the cronjobs directory,
except I've just looked at it and it doesn't touch the import_items or
import_biblios tables.

On Fri, Sep 11, 2015 at 8:22 AM, Mark Tompsett <mtompset at hotmail.com> wrote:

> Greetings,
>
> mysql> SELECT table_name, table_rows, round(((data_length + index_length)
> / 1024 / 1024),2) "Size in MB" FROM information_schema.TABLES where
> table_schema = "koha_library" and ((data_length+index_length)/1024/1024)>10
> order by (data_length+index_length);
> +-------------------------+------------+------------+
> | table_name              | table_rows | Size in MB |
> +-------------------------+------------+------------+
> | marc_subfield_structure |      48064 |      11.73 |
> | statistics              |      26298 |      11.98 |
> | biblio                  |      96620 |      14.03 |
> | deleteditems            |      27767 |      14.48 |
> | import_biblios          |     136336 |      36.33 |
> | deletedbiblioitems      |      19509 |      61.45 |
> | items                   |     122738 |      67.25 |
> | nozebra                 |     264699 |      76.66 |
> | import_items            |     147630 |     130.19 |
> | biblioitems             |     103188 |     343.14 |
> | import_records          |     113028 |     659.55 |
> | biblioimages            |       1176 |     919.47 |
> +-------------------------+------------+------------+
> 12 rows in set (0.33 sec)
>
> So, I was looking to clean up the database a bit, so I figured I’d see
> what was taking up the most space. The import_{something} series of tables
> looked like promising clean up candidates. After all, who doesn’t want to
> free up 750MB or more when running in a 40GB VM?
>
> This led me to this pretty schema page:
> http://schema.koha-community.org/tables/import_records.html
>
> *QUESTION: Would there be any problems if I deleted records associated
> with import_batch_id’s prior to a given date in these related
> import_{something} tables?*
>
> Grace, Peace, Mercy, and Love,
> Mark Tompsett
>
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
>



-- 
Michael Hafen
Washington County School District Technology Department
Systems Analyst
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20150911/60cb6fc7/attachment.html>


More information about the Koha-devel mailing list