Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.6.14
-
None
-
Spider
Description
A simple SELECT query from SPIDER table is slow (~90sec) if WHERE has an IN-list with thousands (5558) of elements. InnoDB has no problems with this - the same query returns result in less than 1 sec.
If the number of elements is reduced, then SPIDER works well too - for example with 8 it takes .003 sec.
SELECT cause_id, location_id, year_id, sex_id, age_group_id, val AS current |
FROM output_epi_single_year_v19063_prevalence |
WHERE metric_id = 1 |
AND measure_id = 5 |
AND year_id = 2022 |
AND sex_id IN (2) |
AND location_id IN (1,4,5,6,7,8,9,10) |
AND age_group_id IN (3) |
AND cause_id IN (294); |
|
8 rows in set (0.003 sec) |
DDL and EXPLAIN FORMAT=JSON added.
Attachments
Issue Links
- is caused by
-
MDEV-12176 Transform [NOT] IN predicate with long list of values INTO [NOT] IN subquery.
-
- Closed
-
- relates to
-
MDEV-32273 Broken queries are passed to the group by handler for execution
-
- Open
-