开发者

How to scale writings in your DB without recurring to sharding?

开发者 https://www.devze.com 2023-03-10 11:34 出处:网络
How would you scale writings without recurring to sharding (specially 开发者_如何转开发with SQL Server 2008)?Normally ... avoid indexes and foreign keys in big tables. Every insert/update on a indexed

How would you scale writings without recurring to sharding (specially 开发者_如何转开发with SQL Server 2008)?


Normally ... avoid indexes and foreign keys in big tables. Every insert/update on a indexed column implies rebuilding partially the index and sometimes this can be very costly. Of course, you'll have to trade query speed VS writing speed but this is a known issue in database design. You can combine this with a NoSQL database with a some sort of mechanism for caching queries. Maybe a fast NoSQL system sitting in front of your transactional system.

Another option is to use transactions in order to do many writes in one go, when you commit the transaction the indexes will be rebuilt but just once per transaction not one per write.


Why not shard? The complexities in the code can be avoided by using transparent sharding tools, which ease all the heavy lifting associated with sharding. Check out ScaleBase for more info

0

精彩评论

暂无评论...
验证码 换一张
取 消