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/
I have a simple table with a 16 byte binary field called 'id', which is the primary key.
MySQL [account]> describe modifications;
+-------+------------+------+------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+------------+------+------+---------+-------+
| id | binary(16) | NO | PRI | NULL | |
+-------+------------+------+------+---------+-------+
1 row in set (0.16 sec)
The following equivalent queries generate different plans, with hexadecimal literals and bit-value literals doing a full table scan instead of using the primary key for the value provided.
I have a simple table with a 16 byte binary field called 'id', which is the primary key.
The following equivalent queries generate different plans, with hexadecimal literals and bit-value literals doing a full table scan instead of using the primary key for the value provided.
I would expect all of these queries to use the IndexReader.
I'm using TiDB version 1.0.4, Docker image release on Kubernetes.