Database / Google Spanner Database Interview questions
What is the difference between batch DML and partitioned DML?
| Batch DML | Partitioned DML |
| Groups several DML statements into one transaction. | Splits one large DML statement across many transactions internally. |
| Fully atomic - all statements commit or none do. | Not atomic as a whole - executes as independent sub-ranges. |
| Bound by normal transaction size and lock limits. | Designed for bulk updates/deletes across millions of rows. |
Batch DML is the right tool when you have several related, moderate-size statements that must succeed or fail together, like updating a handful of related tables in one logical change. Partitioned DML is built for maintenance-style operations, such as deleting rows older than a retention window across an entire large table, where wrapping the whole thing in a single transaction would exceed transaction limits or hold locks far too long.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
