• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.3 How can I minimize my database tables (29MB)?


Active member

I just wanted to upload my xf1.3 database from my local dev system to my webserver when I realized that one of my db tables is 29MB(!). That's a lot, isn't it?

I tried to optimize xf_template_compiled (29MB). But this failed. "Table does not support optimize, doing recreate ".

This is a fresh installation with 5 Testusers, two styles (base + uix) and about 20 empty forums. I already found a similar thread from @BamBam but can't find a solution for my problem.

  • Why is this DB table so huge?
  • What can I do to minimize it and keep it pretty slim in my production environment?
Bildschirmfoto 2014-02-08 um 12.54.25.png



Liam W

Well-known member
That table contains compiled templates. The BLOB column holds 'Executable PHP code built by template compiler'.

If that table didn't exists, then templates would have to be compiled on every page load... Which would slow the site down considerably...



Active member
>>If that table didn't exists, then templates would have to be compiled on every page load...
But isn't that table size of 29 MB too big? I just was astonished because the forum is empty and only has 5 users. What if we have 10000 users and 20000 threads?



Active member
>>That table isn't affected by user or post counts.
>>It is related to styles and templates only.

Ok, fine. When I empty this table before uploading the db will it then be automaticaly restored on the live system?


XenForo developer
Staff member
No. You should never manually manipulate the DB unless you know exactly why you're doing it and the effect it will have.