TiDB should automatically create and maintain histogram information for tables, right?

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

Original topic: tidb 应该是自动创建并且维护表的直方图信息吧

| username: Raymond

Excuse me, teachers?
According to the system table mysql.stats_histograms in TiDB, TiDB should automatically create and maintain histogram statistics for tables by default. This is different from MySQL, which does not automatically create histogram information, right?

| username: Kongdom | Original post link

It is automatically created and maintained, but manual maintenance is also supported.

| username: 胡杨树旁 | Original post link

If the data in the table is less than 1000, it will not be automatically collected and needs to be collected manually.

| username: Raymond | Original post link

Is there any corresponding documentation or code explanation?

| username: Kongdom | Original post link

The link I posted explains this point.

| username: forever | Original post link

MySQL 5.7 does not have histograms; they are available starting from version 8.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.