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

XenForo Cleaning MySql (xf_data_registry,xf_template_compiled,xf_admin_log)

Discussion in 'General PHP and MySQL Discussions' started by Cryptaline, Aug 18, 2012.

  1. Cryptaline

    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.png
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    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.
     
    Cryptaline likes this.
  3. Cryptaline

    Cryptaline Active Member

    No kiding:
    social-top.png

    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:
     
  4. Cryptaline

    Cryptaline Active Member

    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?
     
  5. Cryptaline

    Cryptaline Active Member

    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
     
  6. Chris D

    Chris D XenForo Developer Staff Member

    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.
     
    Cryptaline likes this.
  7. Cryptaline

    Cryptaline Active Member

    Mhm, is it possible to check whats wrong with xen MySql tables size? Just need any idea of why it's so big, any.
     
  8. Cryptaline

    Cryptaline Active Member

    e.g:

    Mb if you will edit some php templates from the style, e.t.c.
     
  9. Chris D

    Chris D XenForo Developer Staff Member

    I don't know, to be honest.

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

    database.PNG

    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.
     
    Cryptaline likes this.
  10. Cryptaline

    Cryptaline Active Member

    Yup this size is what i ve seen in my DB before. :coffee:
     
  11. Cryptaline

    Cryptaline Active Member

    If its not, what else can cause it?
     
  12. Chris D

    Chris D XenForo Developer Staff Member

    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.
     
    Cryptaline likes this.
  13. Cryptaline

    Cryptaline Active Member

    Sure, hang on.
     
  14. Cryptaline

    Cryptaline Active Member

    Here we go
     

    Attached Files:

  15. Nasr

    Nasr Well-Known Member

    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.
     
  16. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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.
     
    Cryptaline and Chris D like this.
  17. Cryptaline

    Cryptaline Active Member

    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:
     
  18. Cryptaline

    Cryptaline Active Member

    + one more screen with my own style (only 1 eh) and addons (0 eh)
    social-top.png
     
  19. Cryptaline

    Cryptaline Active Member

    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.png
     
  20. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    FYI for others... the reported numbers were wrong. Running an optimize on the tables fixed it.
     
    vinhtq, Adam Howard, RoldanLT and 3 others like this.

Share This Page