You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A recent issue for reference, I was running tpc-c workload intensively. As the workload on-going and the auto analyze job failed due to "gc life time is shorter than transaction duration". the statistics did not got updated, then the statistics become outdated, the optimizer switch to pseudo stats and cause plan change.
This behavior assume that the pseudo stats is better than the outdated stats. This is not true.
I would suggest the optimizer sticked to the gathered stats, even it's outdated, to prevent plan change.
// getStatsTable gets statistics information for a table specified by "tableID".
// A pseudo statistics table is returned in any of the following scenario:
// 1. tidb-server started and statistics handle has not been initialized.
// 2. table row count from statistics is zero.
// 3. statistics is outdated.
func getStatsTable(ctx sessionctx.Context, tblInfo *model.TableInfo, pid int64) *statistics.Table {
The text was updated successfully, but these errors were encountered:
Enhancement
A recent issue for reference, I was running tpc-c workload intensively. As the workload on-going and the auto analyze job failed due to "gc life time is shorter than transaction duration". the statistics did not got updated, then the statistics become outdated, the optimizer switch to pseudo stats and cause plan change.
This behavior assume that the pseudo stats is better than the outdated stats. This is not true.
I would suggest the optimizer sticked to the gathered stats, even it's outdated, to prevent plan change.
The text was updated successfully, but these errors were encountered: