Is the sort_buffer_size parameter effective?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: sort_buffer_size参数是否有效

| username: 等一分钟

Is the sort_buffer_size parameter still useful?

| username: xfworld | Original post link

This is a MySQL parameter, I didn’t see this in the default TiDB configuration :rofl:

| username: 等一分钟 | Original post link

This way you can find it, but there is no relevant explanation on the official website.

| username: zhanggame1 | Original post link

If it’s not on the official website, it means it has no effect. Ignore it.

| username: tidb菜鸟一只 | Original post link

It doesn’t seem to work, right?

| username: 等一分钟 | Original post link

It seems that most of the joins in TiDB are hash joins.

| username: zhanggame1 | Original post link

Hash Join
Merge Join
Index Join

Hash Join consumes a lot of resources but can be fast in parallel execution. It is optimal if you do not consider order by limit. Index Join is suitable for small quantities.

Use EXPLAIN to view the execution plan of JOIN queries | PingCAP Documentation Center

| username: 等一分钟 | Original post link

Let me ask another question.

Fast analyze hasn’t reached General Availability and only supports analyze version 1 currently.

The cluster was able to analyze tables before, and the configuration hasn’t been changed. Why can’t it update the statistics now?

| username: heiwandou | Original post link

This parameter is not configured.

| username: 昵称想不起来了 | Original post link

Check what the value of the parameter tidb_analyze_version is.

| username: 昵称想不起来了 | Original post link

If it is 2, execute set global tidb_analyze_version=1; then log in again and try analyze table?

| username: 大飞哥online | Original post link

It wasn’t mentioned, which means it can’t be used and has no effect.

| username: 大飞哥online | Original post link

Change tidb_analyze_version.