core: partition prune not work when partition key has a different type with constant #59123
Labels
component/tablepartition
This issue is related to Table Partition of TiDB.
sig/sql-infra
SIG: SQL Infra
type/enhancement
The issue or PR belongs to an enhancement.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
unnecessary partitions would be pruned, like MySQL result:
3. What did you see instead (Required)
All partitions would be visited.
If the number of partitions are large(e.g., in our online DB, a table has more than 2000+ partititions),the select performance is really poor.
4. What is your TiDB version? (Required)
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v9.0.0-alpha-158-gba79f5078d-dirty
Edition: Community
Git Commit Hash: ba79f50
Git Branch: master
UTC Build Time: 2025-01-22 08:18:45
GoVersion: go1.23.5
Race Enabled: false
Check Table Before Drop: false
Store: unistore |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
The text was updated successfully, but these errors were encountered: