Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.2.5, 1.4.3, 1.5.3
Description
The min/max values for casual partitioning are only updated for a single column in a query, irrespective of the number of columns involved in the query. See below queries that demonstrate this limitation. This means a user would need to perform multiple select queries to get all the min/max values in an extent for all the columns in the table updated, this limitation would affect the user experience when the user performs a filtering operation on a column which was already involved in a previous select query, but it did not have the min/max values updated in that query, thereby reducing performance of the filtering query.
MariaDB [test]> create table c1 (a int, b int, c int)engine=columnstore; |
Query OK, 0 rows affected (0.734 sec) |
|
MariaDB [test]> insert into c1 values (1, 2, 3), (4, 5, 6); |
Query OK, 2 rows affected (0.236 sec) |
Records: 2 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> select calshowpartitions('c1', 'a'); |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| calshowpartitions('c1', 'a') | |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| Part# Min Max Status |
0.0.1 N/A N/A Enabled |
|
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
1 row in set (0.016 sec) |
|
MariaDB [test]> select calshowpartitions('c1', 'b'); |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| calshowpartitions('c1', 'b') | |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| Part# Min Max Status |
0.0.1 N/A N/A Enabled |
|
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
1 row in set (0.016 sec) |
|
MariaDB [test]> select calshowpartitions('c1', 'c'); |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| calshowpartitions('c1', 'c') | |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| Part# Min Max Status |
0.0.1 N/A N/A Enabled |
|
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
1 row in set (0.012 sec) |
|
MariaDB [test]> select a, b from c1 where c < 5; |
+------+------+ |
| a | b |
|
+------+------+ |
| 1 | 2 |
|
+------+------+ |
1 row in set (0.038 sec) |
|
MariaDB [test]> select calshowpartitions('c1', 'a'); |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| calshowpartitions('c1', 'a') | |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| Part# Min Max Status |
0.0.1 N/A N/A Enabled |
|
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
1 row in set (0.002 sec) |
|
MariaDB [test]> select calshowpartitions('c1', 'b'); |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| calshowpartitions('c1', 'b') | |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| Part# Min Max Status |
0.0.1 N/A N/A Enabled |
|
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
1 row in set (0.001 sec) |
|
MariaDB [test]> select calshowpartitions('c1', 'c'); |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| calshowpartitions('c1', 'c') | |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| Part# Min Max Status |
0.0.1 3 6 Enabled |
|
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
1 row in set (0.001 sec) |
|