[horde] horde_histories
Pete at turtle.com
Pete at turtle.com
Tue Feb 18 12:14:17 UTC 2014
Quoting Jan Schneider <jan at horde.org>:
> Zitat von Michael M Slusarz <slusarz at horde.org>:
>
>> Quoting Pete at turtle.com:
>>
>>> My horde_histories table is very large (6+ million records) and mysql
>>> logs many slow queries (>5 seconds) on this table. I have a couple
>>> questions:
>>>
>>> Can this table be pruned? For example can I delete all records older
>>> then
>>> n?
>>
>> Sure.
>>
>>> Is it normal for this table to be so big?
>>
>> Depending on your usage, maybe. You haven't told us what applications
>> you are running.
>>
>> In IMP, for example, this feature is used to provide tracking of
>> forwards/replies. But the entries are automatically trimmed when
>> messages are deleted, so the only way you can reach 6 million records
>> is if you are archiving a lot of messages (and have a lot of users).
>>
>> michael
>> --
>>
>> ___________________________________
>> Michael Slusarz [slusarz at horde.org]
>
> Please note that the history entries are required for synchronization
> though. If you remove entries, it's no longer possible to detect which
> groupware entries have been changed since the last synchronization.
> --
> Jan Schneider
> The Horde Project
> http://www.horde.org/
> https://www.facebook.com/hordeproject
>
> --
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/To unsubscribe, mail:
> horde-unsubscribe at lists.horde.org
Thank you for the answers.
1) The slow queries are exclusively turba and kronolith. Examples are:
SELECT DISTINCT object_uid, history_id FROM horde_histories WHERE
history_modseq > 5510226 AND history_modseq <= 6837638 AND history_action =
'add' AND object_uid LIKE 'kronolith:_VzQICAWYzm_YEEWhgKj%';
SELECT DISTINCT object_uid, history_id FROM horde_histories WHERE
history_modseq > 6322150 AND history_modseq <= 6837398 AND history_action =
'add' AND object_uid LIKE 'turba:_QTm3ALM7SIvXH%';
2) I have about 430 users currently on the system.
3) I understand the entries are used for synchronization but are they used
once and then can be discarded? e.g. if a sync occurs today, can I delete
all turba/kronolith entries with a history_modseq before today without
breaking things?
4) It sounds like I should keep any Imp entries around since they are
needed to track replies, etc. and they clean up automatically on delete
anyway.
Pete
More information about the horde
mailing list