HIVE-29813: (ACID) Improve the query of duplicate deletion from COMPLETED_TXN_COMPONENTS by extending an index - #6721
Open
kuczoram wants to merge 1 commit into
Open
HIVE-29813: (ACID) Improve the query of duplicate deletion from COMPLETED_TXN_COMPONENTS by extending an index#6721kuczoram wants to merge 1 commit into
kuczoram wants to merge 1 commit into
Conversation
|
…ETED_TXN_COMPONENTS by extending an index
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.



What changes were proposed in this pull request?
For the duplicate deletion from the COMPLETED_TXN_COMPONENTS table, I propose to extend the existing index by adding the CTC_WRITEID and CTC_UPDATE_DELETE columns as well.
Why are the changes needed?
We faced some performance issues with this query and trying to find a way to improve it. I did some testing with and without the proposed index change and it can be seen that extending the index improves the performance of this query.
I used a test dataset for testing the delete statement which contained 8.000.000 rows in the COMPLETED_TXN_COMPONENTS table, and 7.996.497 rows got deleted by the query during the testing.
The delete query ran ~130 sec.
After extending the index the delete query ran ~100 sec.
Extending the index would be an easy way to improve the runtime of this query. I checked how much overhead the index extension would mean, but it was negligable.
Does this PR introduce any user-facing change?
No
How was this patch tested?
By unit tests and manually