Archive old Messages in Database.

Hello, how can I archive old Message in the Database, without destruct the structure of the Databasse? Because orts runs here on a p3-700 and the database is now over 100MB. This slows down otrs, so I want to archive old Messages, I dont need anymore. Regards, Timo.

Hi Timo, On Tue, Sep 07, 2004 at 12:43:05PM +0200, Timo Eckert wrote:
how can I archive old Message in the Database, without destruct the structure of the Databasse?
Because orts runs here on a p3-700 and the database is now over 100MB. This slows down otrs, so I want to archive old Messages, I dont need anymore.
Normally a 100MB Database should not slow down you database. Read also: http://doc.otrs.org/1.2/en/html/performance-tuning.html Anyway, there is no way to archive old message by otrs because normally a system can have ~30.000 tickets without performace changes. If a system have ~150.000 tickets, then you should use the OTRS performance tips. However. You can dump/backup your database and after that you can detele ticket (with generic agent) from your database.
Regards, Timo.
Martin Edenhofer -- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Manage your communication!

On Wed, 8 Sep 2004 08:26:01 +0200, Martin Edenhofer

On Thursday, September 09, 2004 12:49 PM
Peter Gervai
A misconfigured GenericAgent created 130000 notes in the tickets. (One note every closed ticket every 10 minutes :-). Stupid me.) As I see these are in "article" table. Since there are no foreign keys defined I cannot really tell whether it's okay to delete these notes or they are referenced from other tables. Can I simply delete them from the table? (Manually using SQL I mean, like DELETE FROM article WHERE a_from='GenericAgent' AND a_subject='stupid admin')
No. You have to take care of the references in article_plain, article_attachement, time_accounting, ticket_history, too, if present. Most probably you'll have one entry in article_plain and ticket_history, zero or more in article_attachement and zero or one in time_accounting, all per article. Well, see this matrix of IDs: SELECT a.id a, ap.id ap, aa.id aa, ta.id ta, th.id th FROM article a LEFT JOIN article_plain ap ON a.id = ap.article_id LEFT JOIN article_attachment aa ON a.id = aa.article_id LEFT JOIN time_accounting ta ON a.id = ta.article_id LEFT JOIN ticket_history th ON a.id = th.article_id WHERE a.a_from = 'GenericAgent' AND a.a_subject = 'stupid admin' ORDER BY a, ap, aa, ta, th ; hth, Robert Kehl -- Für mich gibt es nur "Entweder-Oder". Also entweder voll oder ganz! Toni Polster
participants (4)
-
Martin Edenhofer
-
Peter Gervai
-
Robert Kehl
-
Timo Eckert