Skip to content

importccl: compute expected number of data columns only once#55846

Closed
pbardea wants to merge 2 commits intocockroachdb:masterfrom
pbardea:import-memory
Closed

importccl: compute expected number of data columns only once#55846
pbardea wants to merge 2 commits intocockroachdb:masterfrom
pbardea:import-memory

Conversation

@pbardea
Copy link
Copy Markdown
Contributor

@pbardea pbardea commented Oct 22, 2020

This commit moves the computation of finding the expected number of data
columns to the creation of the input converter, rather than
re-calculating it on every row. The memory footprint of loading all of
the visible columns for every row was noticeable.

Release note (performance improvement): CSV imports should now be
slightly faster.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@pbardea
Copy link
Copy Markdown
Contributor Author

pbardea commented Oct 22, 2020

First commit is #55845. As expected, memory usage of Row() goes down quite a bit. Will follow up with profiles, but it might be nice to also get a sense of any impact on import performance.

The current implementation of checking for validating the number of rows
for computed columns for in non-IMPORT INTO backups is inefficient. This
commit moves the check from being performed on every row to only being
performed once per import.

Release note: None
This commit moves the computation of finding the expected number of data
columns to the creation of the input converter, rather than
re-calculating it on every row. The memory footprint of loading all of
the visible columns for every row was noticeable.

Release note (performance improvement): CSV imports should now be
slightly faster.
@pbardea
Copy link
Copy Markdown
Contributor Author

pbardea commented Oct 22, 2020

Closing in favour of folding this into #55846.

@pbardea pbardea closed this Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants