{"id":34362,"date":"2026-07-20T13:53:52","date_gmt":"2026-07-20T20:53:52","guid":{"rendered":"https:\/\/www.pingcap.com\/?p=34362"},"modified":"2026-07-24T13:55:23","modified_gmt":"2026-07-24T20:55:23","slug":"orm-sharded-mysql-acid","status":"publish","type":"post","link":"https:\/\/www.pingcap.com\/ko\/blog\/orm-sharded-mysql-acid\/","title":{"rendered":"ACID at Scale: Where ORMs and MySQL Disagree"},"content":{"rendered":"<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Key_Takeaways\"><\/span><strong>Key Takeaways<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Your ORM assumes one database with real transactions. Sharded MySQL quietly breaks that assumption.<\/li>\n\n\n\n<li>Cross-shard writes turn one ORM transaction into several, and ACID does not span them.<\/li>\n\n\n\n<li>The failures are silent: Partial writes, phantom state, and bugs you cannot reproduce.<\/li>\n\n\n\n<li>Distributed SQL restores the single-database contract, so the ORM\u2019s assumptions hold again.<\/li>\n<\/ul>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">If you have ever watched an ORM-heavy application meet a sharded MySQL backend, you know the moment I mean. The code looks right. The tests pass. Then production traffic arrives, and you start seeing the impossible: An order without its line items, a user whose profile says one thing and whose billing record says another, a job marked complete that never ran. Nobody changed the code. The database changed shape underneath it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I see this in the field whenever a team scales MySQL by sharding, whether hand-rolled or through a proxy layer. The application was written against a promise: One database, real transactions, what you commit is what you read. The ORM was built on that promise too. Sharding quietly revokes it, and neither your code nor your ORM gets a memo.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_Contract_Your_ORM_Signed\"><\/span><strong>The Contract Your ORM Signed<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Every mainstream ORM, whether it is Hibernate, Django ORM, ActiveRecord, Prisma, or SQLAlchemy, is built on the same handshake with the database. Open a session. Make several changes. Commit, and either everything lands or nothing does. Read your own writes immediately. That handshake is ACID: Atomicity, consistency, isolation, durability.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The ORM leans on it everywhere, in ways you stop noticing. A save() that touches a parent row and three child rows. A unit-of-work that flushes a dozen dirty objects in one commit. Lazy loading that assumes the object graph it is walking is a consistent snapshot. Optimistic locking that assumes a version check and an update happen atomically.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On a single MySQL instance, InnoDB keeps that promise, and everything works. The problems start when one database becomes several and pretends it did not.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Where_Sharded_MySQL_Breaks_the_Handshake\"><\/span><strong>Where Sharded MySQL Breaks the Handshake<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Shard MySQL by customer, by region, by whatever key you chose, and the promise fractures along the shard boundary:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"603\" src=\"https:\/\/static.pingcap.com\/files\/2026\/07\/24131410\/image-2-1024x603.png\" alt=\"One ORM sharded MySQL commit stays atomic on a single instance; split across shards, a failed child write leaves an orphaned order.\" class=\"wp-image-34363\" srcset=\"https:\/\/static.pingcap.com\/files\/2026\/07\/24131410\/image-2-1024x603.png 1024w, https:\/\/static.pingcap.com\/files\/2026\/07\/24131410\/image-2-300x177.png 300w, https:\/\/static.pingcap.com\/files\/2026\/07\/24131410\/image-2-768x452.png 768w, https:\/\/static.pingcap.com\/files\/2026\/07\/24131410\/image-2-1536x905.png 1536w, https:\/\/static.pingcap.com\/files\/2026\/07\/24131410\/image-2-18x12.png 18w, https:\/\/static.pingcap.com\/files\/2026\/07\/24131410\/image-2.png 1800w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><em>Figure 1. One ORM commit stays atomic on a single instance; split across shards, a failed child write leaves an orphaned order.<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>One transaction becomes many. <\/strong>When the parent row lives on shard A and a child row lands on shard B, your ORM\u2019s single commit() is now two commits on two databases. If the second fails after the first succeeds, you have a partial write. The ORM reports success or failure; it has no vocabulary for \u201chalf.\u201d<\/li>\n\n\n\n<li><strong>Isolation stops at the shard edge. <\/strong>Two transactions on different shards do not see each other\u2019s locks or snapshots. Invariants your code enforces across entities, unique constraints, balance checks, and foreign keys become best-effort suggestions the moment the entities land on different shards.<\/li>\n\n\n\n<li><strong>Read-your-writes gets probabilistic. <\/strong>Add read replicas per shard, which every sharded setup does, and the ORM\u2019s assumption that a read after a write sees the write now depends on replication lag. The bug reproduces only under load, on Tuesdays.<\/li>\n\n\n\n<li><strong>The ORM\u2019s query model shrinks. <\/strong>Joins, aggregates, and transactions across shards either fail, silently return partial results through the proxy, or get rewritten as application code. Your data layer migrates upward into your service layer, one workaround at a time.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The system does not fail loudly. It fails quietly, in the gap between what your ORM assumes and what your topology delivers. In distributed systems, boring is the highest compliment, and sharded MySQL under an ORM is never boring.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_Fix_is_Not_a_Smarter_ORM\"><\/span><strong>The Fix is Not a Smarter ORM<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Teams try to patch this at the application layer: saga patterns, two-phase commit libraries, outbox tables, \u201ceventual consistency\u201d wrappers around code that was written to be immediate. All of it works, in the sense that a hand-built distributed transaction layer works. All of it is also your team maintaining distributed-systems machinery that a database should be providing, forever, on every feature.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The cleaner fix is to give the ORM back the database it was promised: One logical database that speaks MySQL and provides ACID across all of it, regardless of where the data physically lives.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That is the category <a href=\"https:\/\/www.pingcap.com\/ko\/what-is-tidb\/\">\ud2f0DB<\/a> lives in. To your ORM, it is MySQL: Same wire protocol, same drivers, same commit(). Underneath, a stateless <a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/tidb-architecture\/\">SQL layer<\/a> plans queries across a distributed storage layer, <a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/tikv-overview\/\">TiKV<\/a>, which shards data automatically into ranges, replicates it with the Raft consensus protocol, and runs distributed transactions with two-phase commit inside the database. Your parent row and child rows may live on different nodes. Your ORM neither knows nor cares. The commit is atomic across all of them, isolation holds cluster-wide, and a read after a write sees the write.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The sharding still happens. It just happens below the SQL line, where it belongs, instead of above it, where your ORM can trip over it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_Honest_Edge\"><\/span><strong>The Honest Edge<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Distributed ACID is not free, and I will not pretend it is. Cross-node transactions pay a coordination cost that a single InnoDB instance does not, so a hot single-row workload on one machine will always beat a distributed commit on raw latency. A few MySQL edge behaviors differ, and some ORM-generated query patterns benefit from a look at the execution plan once you are distributed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But compare the honest alternatives. A single MySQL instance keeps perfect ACID until you outgrow it, and then you are sharding. Sharded MySQL scales and hands the ACID problem to your application. Distributed SQL keeps the contract and moves the coordination cost into the database, where it is engineered once instead of re-invented per team. For an application that has already outgrown one box, that is the trade that keeps your codebase honest.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Guarantee<\/strong><\/th><th><strong>Single MySQL<\/strong><\/th><th><strong>Sharded MySQL<\/strong><\/th><th><strong>Distributed SQL (TiDB)<\/strong><\/th><\/tr><\/thead><tbody><tr><td><strong>Atomic multi-row commit<\/strong><\/td><td>Yes<\/td><td>Only within a shard<\/td><td>Yes, cluster-wide<\/td><\/tr><tr><td><strong>Cross-entity isolation<\/strong><\/td><td>Yes<\/td><td>Breaks across shards<\/td><td>Yes, cluster-wide<\/td><\/tr><tr><td><strong>Read-your-writes<\/strong><\/td><td>Yes<\/td><td>Lag-dependent<\/td><td>Yes<\/td><\/tr><tr><td><strong>Cross-shard joins<\/strong><\/td><td>N\/A (one node)<\/td><td>Application code<\/td><td>Native SQL<\/td><\/tr><tr><td><strong>Who maintains sharding<\/strong><\/td><td>Nobody (until you outgrow it)<\/td><td>Your team, forever<\/td><td>The database<\/td><\/tr><tr><td><strong>Scales writes<\/strong><\/td><td>No<\/td><td>Yes<\/td><td>Yes<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_Takeaway\"><\/span><strong>The Takeaway<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here is the mental model to keep. Your ORM is a contract lawyer for a contract your sharded database stopped honoring. You can renegotiate every clause in application code, or you can restore the contract. If your MySQL workload has outgrown one instance and your codebase is built on an ORM, a distributed SQL database that speaks MySQL is the path that scales without rewriting what your code believes about transactions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>See what this looks like on a real workload. Plaid moved 234 databases and a large ORM-backed codebase to TiDB with a six-person team, keeping the MySQL wire protocol and their existing transactional SQL.<\/em> <em><a href=\"https:\/\/www.pingcap.com\/ko\/blog\/accelerating-distributed-sql-adoption-plaid-amazon-aurora-migration\/\">Read the Plaid migration story<\/a>.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"FAQs\"><\/span><strong>\uc790\uc8fc \ubb3b\ub294 \uc9c8\ubb38<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Do ORMs work with sharded MySQL?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Partially. ORMs connect and run single-shard queries fine, but their transaction, join, and consistency features assume one database. Cross-shard operations break atomicity and isolation guarantees the ORM silently relies on, producing partial writes and inconsistent reads.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What is ACID and why does it matter at scale?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">ACID stands for atomicity, consistency, isolation, and durability: the guarantees that grouped changes land together, invariants hold, concurrent work does not interleave incorrectly, and committed data survives failure. At scale the question is whether those guarantees span your whole dataset or stop at a shard boundary.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Does TiDB support ACID transactions across nodes?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. TiDB provides distributed ACID transactions using two-phase commit over the Raft-replicated TiKV storage layer, so a single transaction can atomically modify rows on different nodes, with snapshot isolation cluster-wide.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Can I keep my ORM if I migrate from MySQL to TiDB?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. TiDB speaks the MySQL wire protocol, so Hibernate, Django ORM, ActiveRecord, Prisma, SQLAlchemy, and other MySQL-compatible ORMs connect with existing drivers and continue issuing the same transactional SQL.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Is there a performance cost to distributed transactions?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, cross-node commits pay a coordination cost that single-instance InnoDB does not. The comparison that matters is against sharded MySQL, where that cost does not disappear but moves into application code your team maintains.<\/p>","protected":false},"excerpt":{"rendered":"<p>If you have ever watched an ORM-heavy application meet a sharded MySQL backend, you know the moment I mean. The code looks right. The tests pass. Then production traffic arrives, and you start seeing the impossible: An order without its line items, a user whose profile says one thing and whose billing record says another, [&hellip;]<\/p>\n","protected":false},"author":323,"featured_media":34370,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[154],"tags":[510,147,14,512,111],"class_list":["post-34362","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-solution","tag-acid-transactions","tag-distributed-sql","tag-mysql","tag-orm","tag-tidb"],"acf":[],"featured_image_src":"https:\/\/static.pingcap.com\/files\/2026\/07\/24135320\/Copy-of-Blog-Feature-1.png","author_info":{"display_name":"Ben Sherrill","author_link":"https:\/\/www.pingcap.com\/ko\/blog\/author\/bsherrill\/"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>ORM Sharded MySQL: Where ACID Breaks at Scale<\/title>\n<meta name=\"description\" content=\"When an ORM meets sharded MySQL, ACID breaks: partial writes, phantom state. Here&#039;s how distributed SQL restores the contract.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pingcap.com\/ko\/blog\/orm-sharded-mysql-acid\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ORM Sharded MySQL: Where ACID Breaks at Scale\" \/>\n<meta property=\"og:description\" content=\"When an ORM meets sharded MySQL, ACID breaks: partial writes, phantom state. Here&#039;s how distributed SQL restores the contract.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pingcap.com\/ko\/blog\/orm-sharded-mysql-acid\/\" \/>\n<meta property=\"og:site_name\" content=\"TiDB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/pingcap2015\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-20T20:53:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-24T20:55:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static.pingcap.com\/files\/2026\/07\/24135334\/Copy-of-Blog-LinkedIn.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"627\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ben Sherrill\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/static.pingcap.com\/files\/2026\/07\/24135344\/Blog-Twitter-Banner-2.png\" \/>\n<meta name=\"twitter:creator\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:site\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ben Sherrill\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"7\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/orm-sharded-mysql-acid\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/orm-sharded-mysql-acid\\\/\"},\"author\":{\"name\":\"Ben Sherrill\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#\\\/schema\\\/person\\\/147c81795fb60c74d7419c6d8e442378\"},\"headline\":\"ACID at Scale: Where ORMs and MySQL Disagree\",\"datePublished\":\"2026-07-20T20:53:52+00:00\",\"dateModified\":\"2026-07-24T20:55:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/orm-sharded-mysql-acid\\\/\"},\"wordCount\":1350,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/orm-sharded-mysql-acid\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2026\\\/07\\\/24135320\\\/Copy-of-Blog-Feature-1.png\",\"keywords\":[\"ACID transactions\",\"Distributed SQL\",\"MySQL\",\"ORM\",\"TiDB\"],\"articleSection\":[\"Solution\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/orm-sharded-mysql-acid\\\/\",\"url\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/orm-sharded-mysql-acid\\\/\",\"name\":\"ORM Sharded MySQL: Where ACID Breaks at Scale\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/orm-sharded-mysql-acid\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/orm-sharded-mysql-acid\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2026\\\/07\\\/24135320\\\/Copy-of-Blog-Feature-1.png\",\"datePublished\":\"2026-07-20T20:53:52+00:00\",\"dateModified\":\"2026-07-24T20:55:23+00:00\",\"description\":\"When an ORM meets sharded MySQL, ACID breaks: partial writes, phantom state. Here's how distributed SQL restores the contract.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/orm-sharded-mysql-acid\\\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/orm-sharded-mysql-acid\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/orm-sharded-mysql-acid\\\/#primaryimage\",\"url\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2026\\\/07\\\/24135320\\\/Copy-of-Blog-Feature-1.png\",\"contentUrl\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2026\\\/07\\\/24135320\\\/Copy-of-Blog-Feature-1.png\",\"width\":1800,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/orm-sharded-mysql-acid\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pingcap.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ACID at Scale: Where ORMs and MySQL Disagree\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#website\",\"url\":\"https:\\\/\\\/www.pingcap.com\\\/\",\"name\":\"TiDB\",\"description\":\"TiDB | SQL at Scale\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pingcap.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#organization\",\"name\":\"PingCAP\",\"url\":\"https:\\\/\\\/www.pingcap.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2021\\\/11\\\/pingcap-logo.png\",\"contentUrl\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2021\\\/11\\\/pingcap-logo.png\",\"width\":811,\"height\":232,\"caption\":\"PingCAP\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/facebook.com\\\/pingcap2015\",\"https:\\\/\\\/x.com\\\/PingCAP\",\"https:\\\/\\\/linkedin.com\\\/company\\\/pingcap\",\"https:\\\/\\\/youtube.com\\\/channel\\\/UCuq4puT32DzHKT5rU1IZpIA\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#\\\/schema\\\/person\\\/147c81795fb60c74d7419c6d8e442378\",\"name\":\"Ben Sherrill\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2022\\\/10\\\/17234942\\\/avatar.jpg\",\"url\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2022\\\/10\\\/17234942\\\/avatar.jpg\",\"contentUrl\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2022\\\/10\\\/17234942\\\/avatar.jpg\",\"caption\":\"Ben Sherrill\"},\"description\":\"Senior Solutions Engineer\",\"url\":\"https:\\\/\\\/www.pingcap.com\\\/ko\\\/blog\\\/author\\\/bsherrill\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ORM Sharded MySQL: Where ACID Breaks at Scale","description":"When an ORM meets sharded MySQL, ACID breaks: partial writes, phantom state. Here's how distributed SQL restores the contract.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pingcap.com\/ko\/blog\/orm-sharded-mysql-acid\/","og_locale":"ko_KR","og_type":"article","og_title":"ORM Sharded MySQL: Where ACID Breaks at Scale","og_description":"When an ORM meets sharded MySQL, ACID breaks: partial writes, phantom state. Here's how distributed SQL restores the contract.","og_url":"https:\/\/www.pingcap.com\/ko\/blog\/orm-sharded-mysql-acid\/","og_site_name":"TiDB","article_publisher":"https:\/\/facebook.com\/pingcap2015","article_published_time":"2026-07-20T20:53:52+00:00","article_modified_time":"2026-07-24T20:55:23+00:00","og_image":[{"width":1200,"height":627,"url":"https:\/\/static.pingcap.com\/files\/2026\/07\/24135334\/Copy-of-Blog-LinkedIn.png","type":"image\/png"}],"author":"Ben Sherrill","twitter_card":"summary_large_image","twitter_image":"https:\/\/static.pingcap.com\/files\/2026\/07\/24135344\/Blog-Twitter-Banner-2.png","twitter_creator":"@PingCAP","twitter_site":"@PingCAP","twitter_misc":{"\uae00\uc4f4\uc774":"Ben Sherrill","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"7\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pingcap.com\/blog\/orm-sharded-mysql-acid\/#article","isPartOf":{"@id":"https:\/\/www.pingcap.com\/blog\/orm-sharded-mysql-acid\/"},"author":{"name":"Ben Sherrill","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/147c81795fb60c74d7419c6d8e442378"},"headline":"ACID at Scale: Where ORMs and MySQL Disagree","datePublished":"2026-07-20T20:53:52+00:00","dateModified":"2026-07-24T20:55:23+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pingcap.com\/blog\/orm-sharded-mysql-acid\/"},"wordCount":1350,"publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"image":{"@id":"https:\/\/www.pingcap.com\/blog\/orm-sharded-mysql-acid\/#primaryimage"},"thumbnailUrl":"https:\/\/static.pingcap.com\/files\/2026\/07\/24135320\/Copy-of-Blog-Feature-1.png","keywords":["ACID transactions","Distributed SQL","MySQL","ORM","TiDB"],"articleSection":["Solution"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/www.pingcap.com\/blog\/orm-sharded-mysql-acid\/","url":"https:\/\/www.pingcap.com\/blog\/orm-sharded-mysql-acid\/","name":"ORM Sharded MySQL: Where ACID Breaks at Scale","isPartOf":{"@id":"https:\/\/www.pingcap.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pingcap.com\/blog\/orm-sharded-mysql-acid\/#primaryimage"},"image":{"@id":"https:\/\/www.pingcap.com\/blog\/orm-sharded-mysql-acid\/#primaryimage"},"thumbnailUrl":"https:\/\/static.pingcap.com\/files\/2026\/07\/24135320\/Copy-of-Blog-Feature-1.png","datePublished":"2026-07-20T20:53:52+00:00","dateModified":"2026-07-24T20:55:23+00:00","description":"When an ORM meets sharded MySQL, ACID breaks: partial writes, phantom state. Here's how distributed SQL restores the contract.","breadcrumb":{"@id":"https:\/\/www.pingcap.com\/blog\/orm-sharded-mysql-acid\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pingcap.com\/blog\/orm-sharded-mysql-acid\/"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/blog\/orm-sharded-mysql-acid\/#primaryimage","url":"https:\/\/static.pingcap.com\/files\/2026\/07\/24135320\/Copy-of-Blog-Feature-1.png","contentUrl":"https:\/\/static.pingcap.com\/files\/2026\/07\/24135320\/Copy-of-Blog-Feature-1.png","width":1800,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/www.pingcap.com\/blog\/orm-sharded-mysql-acid\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pingcap.com\/"},{"@type":"ListItem","position":2,"name":"ACID at Scale: Where ORMs and MySQL Disagree"}]},{"@type":"WebSite","@id":"https:\/\/www.pingcap.com\/#website","url":"https:\/\/www.pingcap.com\/","name":"\ud2f0DB","description":"TiDB | SQL at Scale","publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pingcap.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/www.pingcap.com\/#organization","name":"PingCAP","url":"https:\/\/www.pingcap.com\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/","url":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","contentUrl":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","width":811,"height":232,"caption":"PingCAP"},"image":{"@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/pingcap2015","https:\/\/x.com\/PingCAP","https:\/\/linkedin.com\/company\/pingcap","https:\/\/youtube.com\/channel\/UCuq4puT32DzHKT5rU1IZpIA"]},{"@type":"Person","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/147c81795fb60c74d7419c6d8e442378","name":"Ben Sherrill","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg","url":"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg","contentUrl":"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg","caption":"Ben Sherrill"},"description":"Senior Solutions Engineer","url":"https:\/\/www.pingcap.com\/ko\/blog\/author\/bsherrill\/"}]}},"grav_blocks":false,"card_markup":"<a class=\"card-resource bg-white\" href=\"https:\/\/www.pingcap.com\/ko\/blog\/orm-sharded-mysql-acid\/\"><div class=\"card-resource__image-container\"><img class=\"card-resource__image\" alt=\"Copy of Blog - Feature\" src=\"https:\/\/static.pingcap.com\/files\/2026\/07\/24135320\/Copy-of-Blog-Feature-1.png\" loading=\"lazy\" width=1800 height=600 \/><\/div><div class=\"card-resource__content-container\"><div class=\"card-resource__content-head\"><div class=\"card-resource__category\">Solution<\/div><\/div><h5 class=\"card-resource__title\">ACID at Scale: Where ORMs and MySQL Disagree<\/h5><\/div><\/a>","_links":{"self":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/34362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/users\/323"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/comments?post=34362"}],"version-history":[{"count":8,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/34362\/revisions"}],"predecessor-version":[{"id":34376,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/34362\/revisions\/34376"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media\/34370"}],"wp:attachment":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media?parent=34362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/categories?post=34362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/tags?post=34362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}