[SERVER-63727] Optimize inserts for unique indexes that don't have old format keys Created: 16/Feb/22  Updated: 06/Dec/22  Resolved: 25/Feb/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Louis Williams Assignee: Backlog - Storage Execution Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-63577 Ensure that new unique indexes don't ... Closed
Assigned Teams:
Storage Execution
Participants:

 Description   

After SERVER-63577, we will know definitively when a unique index contains only new-format keys.

This means we can skip this code that inserts and deletes a key every time we check for a duplicate.

This will significantly speed up inserts in two ways:
1. We don't have to perform this extra insert and delete
2. We can avoid performance issues with performing search_near when a lot of keys are not visible. See WT-8150.



 Comments   
Comment by Louis Williams [ 25/Feb/22 ]

yuhong.zhang, you're completely right. Thanks for clarifying. I think the comments about upgrading threw me off. Since that is true, I don't think there's anything improvement we can make in MongoDB. I'm going to instead link to WT-8431 which describes the performance problem with many invisible updates.

Generated at Thu Feb 08 05:58:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.