Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

performance benefits using BINARY vs CHAR. Round 2: VARBINARY vs VARCHAR

is it true that there are performance benefits (in inserting, comparing, etc) when using the BINARY compared to CHAR?

Similarly, VARBINARY is more performant than VARCHAR data types??

like image 816
Yony Avatar asked Apr 17 '26 14:04

Yony


1 Answers

CHAR(datatype) is more performance than VARCHAR.

Atomic datatype is more performance because it is indexable.

Always use char, varchar when store text data because you can use like, concat,etc operation on varchar(datatype) or char(datatype).

Always use BINARY(fixed), VARBINARY(var) when store binary data such as image, file, etc…

like image 193
MajidTaheri Avatar answered Apr 19 '26 10:04

MajidTaheri



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!