sqlbase: switch to operating on slices of pointers to ColumnDescriptors #51118
Labels
C-cleanup
Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
In #50727, Nathan noticed that:
"In general, this indicates that we should move away from copying around these ColumnDescriptors by value. They are currently 120 bytes large, which isn't huge, but also isn't small. Furthermore, unlike TableDescriptors, we almost never pass around only a single ColumnDescriptor. Instead, we're usually operating on every column touched by a query, so this 120 bytes can blow up fast. For instance, if we estimate that the average TPC-E query touches somewhere between 8 and 10 columns then a single copy of all of these descriptors during the execution of a query (like we were doing in initColsForScan) requires allocating and copying over 1KB of memory."
Jira issue: CRDB-4071
The text was updated successfully, but these errors were encountered: