• 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

Moshe1010

Well-known member
#1
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?
 

Mike

XenForo developer
Staff member
#2
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.
 

Moshe1010

Well-known member
#3
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.
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
 

Mike

XenForo developer
Staff member
#4
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.
 

EQnoble

Well-known member
#5
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
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
 

Moshe1010

Well-known member
#6
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
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 :)
 

EQnoble

Well-known member
#7
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 :)
quick pull a rabbit outa hat! :)
 

Moshe1010

Well-known member
#8
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 :)