妙。
Shopify 利用了 MySQL 8 的 SKIP LOCKED 特性,采用了一种独特的设计:为每一个可售单位创建一行数据,而不是为每个商品维护一个带有数量列的行。例如,一个拥有 10 件库存的商品在表中会有 10 行记录。

https://shopify.engineering/scaling-inventory-reservations We replaced Redis with MySQL for inventory reservations—and it scaled (2026) - Shopify
 
 
Back to Top