Groups
Groups
Sign in
Groups
Groups
mongodb-user
Conversations
About
Send feedback
Help
Upsert vs Insert+Update Performance
34 views
Skip to first unread message
Leon Pajak
unread,
Dec 6, 2014, 7:43:56 AM
12/6/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongod...@googlegroups.com
Hello,
I am inserting documents to collection. When there is already document with such key I do update instead of insert.
Breakdown looks like that:
90% cases: insert->OK
10% cases: insert->Unique Exception->Update->OK
In such circumstances what would be better(faster) solution:
- To insert and update if i get unqiue exception
OR
- To upsert
Reply all
Reply to author
Forward
0 new messages