-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: pass COPY typed tuples through optimizer untouched #81731
Description
Inspired by /issues/52071 just create and cache the memo for a prepared insert. At first we could just execute each row in a loop but we should look at how to push the entire batch down to the KV boundary. @RaduBerinde outlines one possible way to do that in 52071. Ideally the COPY path and prepared insert batches can benefit from the same set of optimizations. Even further down the road would it make sense to have an enhanced (distsql based?) batch insert implementation that knew about cluster topology, did sorting and pre-range splitting etc to get around single node bottlenecks, this could potentially borrow/share code from bulk I/O.
After some thought it makes more sense to just pass the typed tuples through the optimizer and maybe later we can come back and use this approach for prepared statements.
Jira issue: CRDB-16061
Epic CRDB-14916
Metadata
Metadata
Assignees
Labels
Type
Projects
Status