Replies: 1 comment
-
|
Thanks for the question. DocumentDB doesn't support in-place updates like MongoDBβs WT_MODIFY. While we target the document by TID, PostgreSQL creates a new row and marks the old one dead. Because most documents have secondary indexes, we canβt take advantage of HOT updates, so even small changes result in full rewrites. Thereβs ongoing work in the PG community to do just that, and we'd be more than happy to contribute in any way we can. In the meantime, weβre exploring ways to reduce overhead for update-heavy workloads. If youβre up for sharing more details on your document size and update patterns, thatβd be super helpful. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
On the Discord call earlier today, I asked a question about how large updates were handled, and if there were any plans to match the performance of MongoDB on this front. A discussion makes more sense than an issue.
I haven't worked on the internals of Postgres, MongoDB or WiredTiger, but my applications perform lots of small updates in large documents. Without "normalizing" the documents so full updates can be smaller and faster, it will be harder for DocumentDB to compete in this use case.
MongoDB uses this heuristic when deciding whether to rewrite a record in the WT datastore during an update:
The issues and discussion on the Mongo side when this was implemented are WT-2792 and SERVER-29250. Since WT handles in-place updates with MVCC, matching that almost certainly requires implementing a new access method.
Beta Was this translation helpful? Give feedback.
All reactions