[MCOL-5620] PIO and LIO different with different where order Created: 2023-11-23  Updated: 2024-01-21

Status: Stalled
Project: MariaDB ColumnStore
Component/s: N/A
Affects Version/s: 23.02.4, 23.10.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Richard Stracke Assignee: Sergey Zefirov
Resolution: Unresolved Votes: 1
Labels: performance


 Description   

to reproduce

 set max_recursive_iterations = 100000000;
 
drop table if exists  `t1`;
	
CREATE TABLE `t1` (
 `c1` int(11) DEFAULT NULL,
 `c2` int(11) DEFAULT NULL
   ) ENGINE=Columnstore DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
   
	
      INSERT INTO `t1`  (
with recursive series as (
select 5552698 as c2,FLOOR(1697580000 + (RAND() * 10000)) as c1 union all
select c2 +1 as c2, FLOOR(1697580000 + (RAND() * 10000))  as c1  from series
where c2 < 26562718)
select c1,c2 from series);
 
 
SELECT calSetTrace(1);
select calFlushCache();
select count(1) from t1 where c1 between 1697580000 and 1697598000 and c2 in (5552698,5552869,5553096,5553534,5553798,5554779,5555176);
SELECT calGetTrace();
 
SELECT calSetTrace(1);
select calFlushCache();
select count(1) from t1 where c2 in (5552698,5552869,5553096,5553534,5553798,5554779,5555176) and c1 between 1697580000 and 1697598000;
SELECT calGetTrace();

First Run:

Desc Mode Table TableOID ReferencedColumns PIO  LIO  PBE  Elapsed Rows
BPS  PM   t1    3111     (c1,c2)           5122 5120 6167 0.136   1024
TAS  UM   -     -        -                 -    -    -    0.123   1
TNS  UM   -     -        -                 -    -    -    0.000   1

Second run

Desc Mode Table TableOID ReferencedColumns PIO  LIO  PBE  Elapsed Rows
BPS  PM   t1    3111     (c1,c2)           9216 9214 6167 0.196   1024
TAS  UM   -     -        -                 -    -    -    0.170   1
TNS  UM   -     -        -                 -    -    -    0.000   1

It is reproducable


Generated at Thu Feb 08 02:59:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.