SQLTeam.com | Weblogs | Forums

Chosing right collation in regard to performance


#1

I have two tables to wich php saves text data on user demand.

My design is as follows.
Fist table:
plan varchar(1000) - latin1_swedish_ci / this colum can recive foregn letters, but are saved coded in latin
fabric_canvas varchar(20 000) - latin1_swedish_ci / text from SVG file created by fabric.js
Second:
therapy varchar(500) - utf8_unicode_ci
material varchar(500) - utf8_unicode_ci

Will i suffer from performance drop if I set first table to utf8_unicode_ci, i have alredy set mysqli connection to utf8
Shuld i change only collum plan (first table) to utf8_unicode_ci and lessen the performance that way.
Or should i change bac everything to latin since it works fine sets all the letters fine
Is performance in this case negligible.


#2

This is an MS SQL Serer forum, so you may not find folk here that are knowledgeable on MySQL - particularly for something "subtle" like this ...

That said, I'd be interested to know what folk here think the answer would be for MS SQL Server!! I would definitely set out to keep all columns, which may be JOINed, on the same Collation.


#3

Hello Kristen, thank you for your answer. I also got some inquiry on stack
exchange. It seams that now there is a little dilemma, just for curiosity
on milliseconds.
Maybe you should know. The question is:

I have two fields VARCHAR (20 000) and VARCHAR (40 000) So UTF-8 can't
support that ( I am limited with size in bytes). Max VARCHAR for a table is
~21000 If UTF-8 is used ! So the question would be change that to TEXT with
UTF-8 or leave it as latin VARCHAR and have automatic conversions, what
would be faster to use ? (I have 5.6.34 mysql version)

All in all, what is faster ? (Since I am obliged to have UTF-8 connection
(and overgo automatic conversion on latin tables))

A latin VARCHAR column that has to go throw automatic conversion or to
have a TEXT column with UTF-8 without automatic conversions.

Thank you for reading. I hope I have not bothered you.
Link to stackoverflow:
http://stackoverflow.com/questions/41081541/different-collation-in-one-table-and-collation-issues