1

Table A is 25k rows with a dozen columns, about 8mb of total data set to latin1.

Table B has 2000 rows with two dozen columns, about 5mb of total data set to utf8mb3.

Doing an inner join between the two the overall query time is 1.3 seconds. If I now switch table A to use utf8mb4 the query time is 0.05 seconds for the same query.

Why would there be such a massive difference in query time just because of the collation/charset?

user2280032
  • 372
  • 2
  • 5
  • 16
  • Its fast and can use indexes if the table types are the same, (`utf8mb3` almost equals `utf8mb4`, not sure of the reason here). Differ character test convert in different ways, making the order of the index not reliable would be my assumption. – danblack Jun 03 '22 at 05:05
  • If I limit the join to only a few rows it's the same time, only past 200 rows it gets slow quickly so this must be something with sorting and ordering. I can switch the table to utf8mb4 easily, just curious if this a known behavior or a bug :) – user2280032 Jun 03 '22 at 16:12

0 Answers0