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

XF 1.2 SQL Encoding change

Discussion in 'XenForo Questions and Support' started by Moshe1010, Aug 3, 2013.

  1. Moshe1010

    Moshe1010 Well-Known Member

    Just curious. When importing form a DB that was Windows-1255 (vBulletin 4) to XF 1.2, would the import change the encoding of the database to UTF8 by default? If yes, how come my database hasn't doubled itself since every non-unicode character takes more space when the DB is in UTF8?
     
  2. Mike

    Mike XenForo Developer Staff Member

    It is converted to utf-8. It's more complex than to simply say whether it would double. The data will certainly be a different size.
     
  3. Moshe1010

    Moshe1010 Well-Known Member

    My concern is that my SQL was 884MB before the import and 819MB after the import. Post table is almost the same on both platforms, so this is why I'm confused. No search index tables on both SQLs
     
  4. Mike

    Mike XenForo Developer Staff Member

    Well, there are way to many variables and differences to make a judgement based solely on the DB size.

    If all the posts are there, then that's really the only judgement that can be made.
     
  5. EQnoble

    EQnoble Well-Known Member

    I have not done any imports myself but is it possible that some of the data from your old vb is not imported or used or whatever...like some custom fields or something
     
  6. Moshe1010

    Moshe1010 Well-Known Member

    I'm looking at a single table -xf_posts, which stayed almost the same. For non unicode characters, it should have been greater by 50-100% (at least from my experience when I tried to convert it before to utf8 in a testing environment).

    So I guess it's XF magic :)
     
  7. EQnoble

    EQnoble Well-Known Member

    quick pull a rabbit outa hat! :)
     
    Moshe1010 likes this.
  8. Moshe1010

    Moshe1010 Well-Known Member

    OK, after investigating here is the deal:
    Since I've upgraded from vB3 to vB4 it created a duplicated table called title2 and title 3. It looks like it was a bug in the software during an upgrade (not surprised) and I could have deleted one of these tables.
    What's more funny/interesting is vB's post index table. It's almost 3 times more (in terms of size) than the data itself.
    XF just made it right; currently, index post is about 50MB and the data has doubled itself as expected due to different encoding.
    At the end, it came to the same DB size.

    I can sleep quietly now :)
     
    jazz_aaf likes this.
  9. EQnoble

    EQnoble Well-Known Member

    hey look at that my guess was somewhat correct :D
     

Share This Page