XenForo Cleaning MySql (xf_data_registry,xf_template_compiled,xf_admin_log)

Cryptaline

Active member
Was playing with my custom integrated MySql Database in to XenForo MySql Database and have found that some of xf_(tables) are extra large. I remember a whole size of my Mysql (about 3MBs few weeks ago) Now its about 9MBs. Probably need to clean some logs etc.
So the question is:

Is it possible to clean 1 or even more tables from this list? And how exactly i need to do it?

xf_data_registry, - 400MB :eek:
xf_template_compiled, - 150BM o_O
xf_admin_log. - 67MB :coffee:social-top.webp
 
Could you just double check the amounts again?

None of these quite look right.

First, you start by saying your database has gone from 3MB to 9MB. In the grand scheme of things this is tiny. Do you mean 3-9GB? That's quite high.

Never ever empty xf_template_compiled. You'll lose all your templates, at least until they're rebuilt again... but you'd probably not be able to find the button as you'd have deleted the compiled templates :p

But - how many styles and add-ons do you have installed. 150MB is massive. This should be no more than around 5MB with a style or two installed.

It is safe to empty admin_log, but you can empty that from Admin CP > Tools > Admin Log. I'd recommend going through it first to find out what data is in there.

Do not delete xf_data_registry either. But again, 450MB is very high. Have you got screenshots of these outputs?

Either you're reading KB as MB or there's something wrong.
 
No kiding:
social-top.webp

First, you start by saying your database has gone from 3MB to 9MB. In the grand scheme of things this is tiny. Do you mean 3-9GB? That's quite high.
Nope, my DB isnt that big, from 3MBs to 9MBs (just compresing all my MySql with gzip & then it = 9MBs) :)
I have 1 default style + my own one. No addons at all.
I'm reading it correctly, thats why i'm asking for an advice wth is going on :coffee:
 
A lil update, I ve found that I ve deleted default theme style from ACP (but ve not touched its files in a style folder) can it cause this problem?
 
It is safe to empty admin_log, but you can empty that from Admin CP > Tools > Admin Log. I'd recommend going through it first to find out what data is in there.
I ve seen Admin CP > Tools > Admin Log, but i don't have any option to clean it. I ve checked it in debug mode also. There are no options to clean it from ACP. :coffee:
xenforo 1.1.2
 
I ve seen Admin CP > Tools > Admin Log, but i don't have any option to clean it. I ve checked it in debug mode also. There are no options to clean it from ACP. :coffee:
xenforo 1.1.2
Sorry my bad.

You do have to clear it from the database.

TRUNCATE `xf_admin_log`

A lil update, I ve found that I ve deleted default theme style from ACP (but ve not touched its files in a style folder) can it cause this problem?
Nope. If you delete it from the Admin CP I'd expect the size of the database to go down.
 
Sorry my bad.

You do have to clear it from the database.

TRUNCATE `xf_admin_log`


Nope. If you delete it from the Admin CP I'd expect the size of the database to go down.

Mhm, is it possible to check whats wrong with xen MySql tables size? Just need any idea of why it's so big, any.
 
I don't know, to be honest.

It's not a XenForo problem - I've not seen this before.

database.webp

See the size of xf_template_compiled?

Thousands of rows, yet only 20.3MiB and that is on an active forum with multiple styles installed.
 
Can you do a dump of your xf_template_compiled table and upload it?

I'm intrigued...

It says yours has about 20,000 rows... unless you've got about 10 styles installed that's impossible.
 
If you've converted from a different platform. It's normal for your db to grow in size. This is due to the way xenforo handles the search index.
 
Yeah how many styles?

Also, 40000 rows in xf_data_registry is waaaaaay wrong. That table normally has 30-50 rows depending on addons you installed. I would like to examine your database if you can give me access to phpmyadmin or FTP access.
 
Yeah how many styles?

Also, 40000 rows in xf_data_registry is waaaaaay wrong. That table normally has 30-50 rows depending on addons you installed. I would like to examine your database if you can give me access to phpmyadmin or FTP access.

Sure Jake,
I ve not integrated any addons or other forum DBs in to xenforo, so thats why im asking because i know thats smth wrong with it. :coffee:
 
Yeah how many styles?

Also, 40000 rows in xf_data_registry is waaaaaay wrong. That table normally has 30-50 rows depending on addons you installed. I would like to examine your database if you can give me access to phpmyadmin or FTP access.

Jake, check yours conversations. I ve sent user info to you for PhpMyAdmin.

Thx alot to Jake, numbers were wrong,
and the result after optimizing it is:
social-top.webp
 
Top Bottom