Performance problem due to mdl_cache_text table?

Performance problem due to mdl_cache_text table?

by Etan Lightstone -
Number of replies: 0
I'm running moodle 1.4 and I've noticed that hitting course pages is starting to become VERY slow.

I have a logfile of all selects being done on the database, and I watched in realtime what happens when I hit a seamingly small course page...

it laggs at this point:

LOG: statement: SELECT * FROM mdl_cache_text WHERE id ='-1'
LOG: statement: SELECT NEXTVAL('mdl_cache_text_id_seq')
LOG: statement: INSERT INTO mdl_cache_text ( ID, MD5KEY, FORMATTEDTEXT, TIMEMODIFIED ) VALUES ( 1316729, '07a647d64ed806a3fae7d05644ababbf', 'Class one:', 1123267803 )
LOG: statement: SELECT * FROM mdl_cache_text WHERE md5key = 'd41d8cd98f00b204e9800998ecf8427e' AND timemodified > '1123267743' LIMIT 1
LOG: statement: SELECT * FROM mdl_cache_text WHERE md5key = 'd41d8cd98f00b204e9800998ecf8427e' AND timemodified > '1123267744' LIMIT 1
LOG: statement: SELECT * FROM mdl_cache_text WHERE md5key = 'd41d8cd98f00b204e9800998ecf8427e' AND timemodified > '1123267746' LIMIT 1
LOG: statement: SELECT * FROM mdl_cache_text WHERE md5key = 'd41d8cd98f00b204e9800998ecf8427e' AND timemodified > '1123267747' LIMIT 1
LOG: statement: SELECT * FROM mdl_cache_text WHERE md5key = 'd41d8cd98f00b204e9800998ecf8427e' AND timemodified > '1123267748' LIMIT 1

Upon further inspection I noticed my mdl_cache_text table has over 1 million rows!

I figured this was because I RARELY run the cron script for moodle, and upon further inspection I noticed something in cron.php about clearing cache_text. However it expects there to be a $CFG->cachetext in my config php. I've never heard of that config option, nor did I know it existed, and I can find no information on it!

Should I add this designation to my config.php? what does it do? How come there is no documentation on it?

Thanks for you help
my moodle is $release = '1.4.4 +';
Average of ratings: -