pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
https://pingcap.com
Apache License 2.0
37.01k stars 5.82k forks source link

'show analyze status;' lacks a failed analyze job information #54657

Open apollodafoni opened 2 months ago

apollodafoni commented 2 months ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

3. What did you see instead (Required)

[2024/07/15 17:11:08.057 +00:00] [INFO] [analyze.go:748] ["analyze tableVKYDMN.thas finished"] [partition=] ["job info"="analyze table all indexes, all columns with 256 buckets, 100 topn, 0.010967098703888335 samplerate"] ["start time"=2024/07/15 17:11:05.094 +00:00] ["end time"=2024/07/15 17:11:08.052 +00:00] [cost=2.957842037s] ["sample rate reason"="use min(1, 110000/10030000) as the sample-rate=0.010967098703888335"] [2024/07/15 17:11:19.721 +00:00] [INFO] [set.go:170] ["set global var"] [conn=4194304766] [name=tidb_auto_analyze_start_time] [val="00:00 +0000"] [2024/07/15 17:11:19.740 +00:00] [INFO] [set.go:170] ["set global var"] [conn=4194304766] [name=tidb_auto_analyze_end_time] [val="23:59 +0000"] [2024/07/15 17:11:19.763 +00:00] [INFO] [set.go:170] ["set global var"] [conn=4194304766] [name=tidb_auto_analyze_ratio] [val=0.0001] [2024/07/15 17:11:47.941 +00:00] [INFO] [refresher.go:101] ["Auto analyze triggered"] [category=stats] [job="NonPartitionedTableAnalysisJob:\n\tAnalyzeType: analyzeTable\n\tIndexes: \n\tSchema: VKYDMN\n\tTable: t\n\tTableID: 115\n\tTableStatsVer: 2\n\tChangePercentage: 0.002991\n\tTableSize: 20120000.00\n\tLastAnalysisDuration: 40.1s\n\tWeight: -0.302602\n"] [2024/07/15 17:11:47.951 +00:00] [ERROR] [exec.go:66] ["auto analyze failed"] [category=stats] [sql="analyze tableVKYDMN.t"] [cost_time=10.613364ms] [error="[executor:1317]Query execution was interrupted"]

mysql> show analyze status\G 1. row Table_schema: VKYDMN Table_name: t Partition_name: Job_info: analyze table all indexes, all columns with 256 buckets, 100 topn, 0.010967098703888335 samplerate Processed_rows: 10030000 Start_time: 2024-07-15 17:11:05 End_time: 2024-07-15 17:11:08 State: finished Fail_reason: NULL Instance: Process_ID: NULL Remaining_seconds: NULL Progress: NULL Estimated_total_rows: NULL

4. What is your TiDB version? (Required)

Git Commit Hash: 9044acbff3a189b26b52ffd2990ce7b4f59021e0

apollodafoni commented 2 months ago

/sig planner