Re: Why can't MySQL use a range over a Clustered Primary Key
In a SELECT query, as expected, it can & does ...
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: device_data
partitions: NULL
type: ALL
possible_keys: PRIMARY
key: NULL
key_len: NULL
ref: NULL
rows: 100
filtered: 33.33
Extra: Using where
*************************** 2. row ***************************
id: 1
select_type: SIMPLE
table: device_data
partitions: NULL
type: ref
possible_keys: PRIMARY
key: PRIMARY
key_len: 4
ref: test.device_data.device_id
rows: 1
filtered: 100.00
Extra: Using index; FirstMatch(device_data)
In a query that updates or deletes, it trips over a different error: "You can't specify target table 'device_data' for update in FROM clause".
Subject
Written By
Posted
Re: Why can't MySQL use a range over a Clustered Primary Key
January 20, 2022 08:45PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.