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
Currently, if we change tidb_partition_mode into dynamic from static, and execute query for a partition table without analyzing table for generating global stats. Optimizer will think the table stats as pseudo and provide a bad plan.
To revise this behavior, Optimizer can still think table stats as static for the partition table which has no global stats.
The text was updated successfully, but these errors were encountered:
@Yisaer, how about we always create both per partition and global statistics for partitioned tables, as long as we support both static and dynamic tidb_partition_prune_mode?
@mjonss I think this is a good idea, partition table can be always generated global stats and partition stats without considering prune mode. prune_mode should only affect the behavior of the optimizer, instead of analyzing. I will discuss this idea with PM later.
Enhancement
Currently, if we change
tidb_partition_mode
intodynamic
fromstatic
, and execute query for a partition table without analyzing table for generating global stats. Optimizer will think the table stats aspseudo
and provide a bad plan.To revise this behavior, Optimizer can still think table stats as
static
for the partition table which has no global stats.The text was updated successfully, but these errors were encountered: