sql: pass COPY typed tuples through optimizer untouched #81731
Labels
A-migrations
Migrating to CRDB from another database vendor
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-sql-queries
SQL Queries Team
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
The text was updated successfully, but these errors were encountered: