Show analyze status; Display Time Issue

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

Original topic: show analyze status;显示时间问题

| username: db_user

Bug Report
Clearly and accurately describe the issue you found. Providing any possible steps to reproduce the issue will help the development team address it promptly.
【TiDB Version】Found in v4, v5, and v6
【Impact of the Bug】
Incorrect time
【Possible Steps to Reproduce the Issue】
The time of analyze does not match
show analyze status:
image
show variables like ‘%analyze%’
image

【Observed Unexpected Behavior】
The start_time in show analyze status does not match the time range of tidb_auto_analyze_start_time and tidb_auto_analyze_end_time.
【Expected Behavior】
The times should match.
【Related Components and Specific Versions】

【Other Background Information or Screenshots】
Such as cluster topology, system and kernel version, application app information, etc.; if the issue is related to SQL, please provide the SQL statements and related table schema information; if there are critical errors in the node logs, please provide the relevant node log content or files; if some business-sensitive information is inconvenient to provide, please leave contact information, and we will communicate with you privately.

| username: Raymond | Original post link

Is your system time and TiDB time accurate?

| username: db_user | Original post link

It’s accurate. You can also help check your environment. I’ve looked at several environments, and they are all the same.

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

The output of SHOW ANALYZE STATUS; includes not only automatically collected tasks but also manually collected ones. Are you sure you haven’t deployed any scripts for manually collecting statistics?
Alternatively, you can use SHOW VARIABLES LIKE '%zone%'; to check the time zone settings and compare them with the time zone on your server.

| username: db_user | Original post link

I am sure I did not manually analyze it.
image
Even if the time zone is incorrect, it shouldn’t be off by three hours. You can also check your environment.

| username: TiDBer_pkQ5q1l0 | Original post link

The incorrect time zone shouldn’t result in an extra half hour; it likely isn’t a time zone issue.

| username: db_user | Original post link

Ignore it, my bad, I forgot that I had written a script for this environment :joy:

| username: Raymond | Original post link

I really thought I had discovered a new bug.

| username: tidb狂热爱好者 | Original post link

Ignore it, my bad, I forgot that I wrote a script for this environment :joy: Script issue

| username: db_user | Original post link

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