[MCOL-3826] Casual partitioning data only updated for a single column in a query Created: 2020-02-21  Updated: 2023-10-25  Resolved: 2023-10-25

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr, PrimProc
Affects Version/s: 1.2.5, 1.4.3, 1.5.3
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: Gagan Goel (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: performance


 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)


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