Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Duplicate
-
23.02.4
-
None
-
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
===============================================