[MCOL-4765] Allow condition pushdown to ColumnStore for a cross-engine UPDATE on a foreign table Created: 2021-06-18  Updated: 2023-12-15

Status: Open
Project: MariaDB ColumnStore
Component/s: MDB Plugin
Affects Version/s: 6.1.1
Fix Version/s: Icebox

Type: New Feature Priority: Major
Reporter: Gagan Goel (Inactive) Assignee: Max Mether
Resolution: Unresolved Votes: 0
Labels: performance

Issue Links:
Relates
relates to MCOL-1482 cross-engine update... join... not wo... Closed

 Description   

Fix for MCOL-1482 allows for a foreign table to be updated in a cross-engine UPDATE statement involving a ColumnStore table.

However, the current performance for such a cross-engine foreign table UPDATE will be very slow since a full-table scan on ColumnStore is performed. As an example, consider the following scenario:

-- create a columnstore and an innodb table
drop table if exists mcs; drop table if exists idb; 
create table mcs(a int, b int) engine=columnstore;
create table idb(a int, b int) engine=innodb;
 
-- insert some rows
insert into mcs(a,b) values(1,2),(2,3),(4,5);
insert into idb(a,b) values(1,2),(2,3),(4,5);
 
update idb dest join mcs src on dest.a=src.a set dest.b=src.b where src.a < 3;

Currently, server makes the handler::rnd_init() call before the handler::cond_push() call. This causes the ColumnStore execution plan to be created (which is created during the call to handler::rnd_init()) without the WHERE predicate pushed-down to CS. As a result, for the 2 matching InnoDB records, server fetches all 3 CS records instead of 2 which satisfy the WHERE predicate, which is wasteful.

The aim of this task is to pushdown all possible conditions (WHERE predicates as well as JOIN ON expressions) to CS before the creation of the CS execution plan.


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