Partitioning moodle's log table

Partitioning moodle's log table

by Antonio Piedras -
Number of replies: 2

Hi people,

the growth of the moodle's log table is a very big problem in large sites.
In the included zip file there are two documents (english and spanish versions) with a proposed solution working with system database.

greetings

Average of ratings: -
In reply to Antonio Piedras

Re: Partitioning moodle's log table

by Tomasz Muras -
Picture of Core developers Picture of Plugin developers Picture of Plugins guardians Picture of Translators

Hello Antonio,

I don't undestand why do you need to partition log table, PosgreSQL has pretty big limits for the tables:

  • Maximum Table Size: 32 TB
  • Maximum Rows per Table: Unlimited

Maybe you could instead cut the table peridically? Moodle does that but this way you will loose some of the records, so instead you may want to do it manually from time to time to archive the mdl_log data you've cut.

Cheers,
Tomasz Muras
Enovation Solutions

In reply to Tomasz Muras

Re: Partitioning moodle's log table

by Yolanda Ordóñez Rufat -

Hi you all,

There's a sub-task to improve the performance of the log table in the tracker (MDL-11901). One big log table leads to inefficient queries and it's a must considered in performance. Some institutions need to keep the log for the semester or the academic year.

greetings,

Yolanda