Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.3.34, 10.4.24, 10.6.7
-
None
-
Debian 10
Description
Optimizer dont fully understand key usage.
Reproduce:
create table with 10 Mio. entries with primary key and dummy column.
do update on key which is not in Table, but enclose the value in '.
Example with direct SQL Console:
update customer set c_name = "ttt" where c_indx ='2387657687258'
It takes over 25 sec. to realize that key is not possible
update customer set c_name = "ttt" where c_indx =2387657687258
Takes under 0.1 sec.
update customer set c_name = "ttt" where c_indx ='2387657687258' *1
Takes under 0.1 sec.
With Prepare and execute
update customer set c_name = "ttt" where c_indx =:c_indx
Over 25 sec.
Select is always under 0.1sec.
Attachments
Issue Links
- is part of
-
MDEV-8787 Return Impossible WHERE instead of Full table scan on some admittedly false field=const expressions
- Open
- relates to
-
MDEV-15759 Expect "Impossible WHERE" for indexed_int_column=out_of_range_int_constant
- Closed