LQ scan / filtering simplification to speed up writes / Singer loads.#464
Merged
LQ scan / filtering simplification to speed up writes / Singer loads.#464
Conversation
…se PKs overlap the PKs of the objects we are going to scan through and that come after them. This is to simplify image creation so that, when making an object, we don't need to care about the old rows it overwrites (and hence don't need to calculate their hash or include it into the object or even find out what they are when we don't have access to the full current table). It will allow us to actually be able to treat objects independently, recalculate their hashes and the index, make it much easier to write to Splitgraph images without checkout etc. The main reason for this is to speed up data ingestion from Singer where we add up chunks of 100k rows and currently have to run a giant JOIN against the current table to figure out which rows we updated. The tradeoff is that sometimes we'll scan through more objects (in the rare case where we're fetching some rows that aren't overwritten by a latter object but the object they come from partially overlaps with an older object). anyway).
… full current table when appending a new fragment to generate a changeset (to find out the old values of the rows we deleted).
… write out the latest one when ingestion ends.
…the right thing here)
mildbyte
added a commit
that referenced
this pull request
Jul 26, 2021
* API functionality to get the raw URL for a data source (#457) * LQ scan / filtering simplification to speed up writes / Singer loads (#464, #489) * API functionality for Airbyte support (`AirbyteDataSource` class, #493) * Speed up `sgr cloud load` by bulk API calls (#500) Full set of changes: [`v0.2.14...v0.2.15`](v0.2.14...v0.2.15)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When figuring out which objects to scan through, also add objects whose PKs overlap the PKs of the objects we are going to scan through and that come after them.
This is to simplify image creation so that, when making an object, we don't need to care about the old rows it overwrites (and hence don't need to calculate their hash or include it into the object or even find out what they are when we don't have access to the full current table). It will allow us to actually be able to treat objects independently, recalculate their hashes and the index, make it much easier to write to Splitgraph images without checkout etc. The main reason for this is to speed up data ingestion from Singer where we add up chunks of 100k rows and currently have to run a giant JOIN against the current table to figure out which rows we updated.
The tradeoff is that sometimes we'll scan through more objects (in the rare case where we're fetching some rows that aren't overwritten by a latter object but the object they come from partially overlaps with an older object).