[MCOL-5600] Query with LIKE Intermediate search is running forever Created: 2023-10-27  Updated: 2023-11-17  Resolved: 2023-10-27

Status: Closed
Project: MariaDB ColumnStore
Component/s: PrimProc
Affects Version/s: 23.02.4
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: suresh ramagiri Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None


 Description   

Reported by one of our Customer that the query with LIKE for '%1%' taking forever to execute, rest all cases working fine.

This is tested at 23.07.0 MariaDB Columnstore release

Locally, I simplified and created the test case in reproducing this case, Results are as follows:

===============================================
MariaDB [test]> create table foo (a varchar(10)) engine=columnstore;
Query OK, 0 rows affected (9.094 sec)

MariaDB [test]>
MariaDB [test]> insert into foo values ('dkdj');
Query OK, 1 row affected (1.855 sec)

MariaDB [test]> select * from foo where a like '%3%';
Empty set (0.021 sec)

MariaDB [test]> select * from foo where a like '%3';
Empty set (0.022 sec)

MariaDB [test]> select * from foo where a like '%1';
Empty set (0.016 sec)

MariaDB [test]> select * from foo where a like '1';
Empty set (0.022 sec)

MariaDB [test]> select * from foo where a like '1%';
Empty set (0.022 sec)

MariaDB [test]> select * from foo where a like '%k%';
------

a

------

dkdj

------
1 row in set (0.022 sec)

MariaDB [test]> select * from foo where a like '%1%'; <================ This query is running forever
===============================================


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