- Learning Apache Cassandra(Second Edition)
- Sandeep Yarabarla
- 255字
- 2021-07-03 00:19:22
Write optimization
Traditional relational and document databases are optimized for read performance. Writing data to a relational database will typically involve making in - place updates to complicated data structures on disk, in order to maintain a data structure that can be read efficiently and flexibly. Updating these data structures is a very expensive operation from a standpoint of disk I/O, which is often the limiting factor for database performance. Since writes are more expensive than reads, you'll typically avoid any unnecessary updates to a relational database, even at the expense of extra read operations.
Cassandra, on the other hand, is highly optimized for write throughput and, in fact, never modifies data on disk; it only appends to existing files or creates new ones. This is much easier on disk I/O and means that Cassandra can provide astonishingly high write throughput. Since both writing data to Cassandra and storing data in Cassandra are inexpensive, denormalization carries little cost and is a good way to ensure that data can be efficiently read in various access scenarios.
Because Cassandra is optimized for write volume, you shouldn't shy away from writing data to the database. In fact, it's most efficient to write without reading whenever possible, even if doing so might result in redundant updates.
Just because Cassandra is optimized for writes doesn't make it bad at reads; in fact, a well-designed Cassandra database can handle very heavy read loads with no problem. We'll cover the topic of efficient data modeling in great depth in the next few chapters.
- 大數據導論:思維、技術與應用
- Mastering Proxmox(Third Edition)
- 智能傳感器技術與應用
- 自動控制原理
- Dreamweaver CS3網頁設計50例
- 輕松學Java
- 機器自動化控制器原理與應用
- 大型數據庫管理系統(tǒng)技術、應用與實例分析:SQL Server 2005
- 21天學通Java Web開發(fā)
- 大學C/C++語言程序設計基礎
- 水下無線傳感器網絡的通信與決策技術
- Working with Linux:Quick Hacks for the Command Line
- 中文版AutoCAD 2013高手速成
- Spark大數據商業(yè)實戰(zhàn)三部曲:內核解密|商業(yè)案例|性能調優(yōu)
- 網絡安全概論