Jan 5 · 2 min read · 1. 規劃階段:奠定高效能的架構基石 在任何資料庫專案的初期,無論是新建系統、執行遷移,或是進行重大升級,審慎的架構規劃都是決定專案成敗的關鍵。此階段所做出的基礎性決策(foundational decisions)——例如核心資料結構的選型、索引策略的制定,以及主鍵的設計——將直接決定系統未來的擴展性、效能表現與長期維護成本。一個深思熟慮的開端,是打造一個穩健、高效數據系統的基石。 1.1 核心資料結構的選擇:B+ 樹的優越性 現代資料庫系統,特別是處理交易型工作負載的系統,普遍選擇 B+ 樹...
Join discussionJan 4 · 2 min read · 如果我們將資料庫想像成一座巨大的圖書館,那麼資料表 (Table) 就是一本本書籍,每一筆資料列 (Row) 是書中的句子,而我們今天要談論的主角——頁面 (Page)——就是構成書本的每一頁。 許多開發者視資料庫為一個黑盒子,但只要我們願意翻開書頁,理解「頁面」是如何儲存資料的,我們就等於掌握了揭開資料庫效能秘密的第一把鑰匙。 -------------------------------------------------------------------------------- 1. ...
Join discussionSep 24, 2025 · 2 min read · What is a Database? An organised collection of Data. A method to manipulate and access the data. Database vs DBMS What is RDBMS A type of database system that stores data in stractured table (using rows and columns) and uses SQL for managing and que...
Join discussionJul 28, 2025 · 3 min read · You’ve built an app. It works fine locally, passes load tests, even sails through staging. But the moment real users flood in — updates spike, interactions multiply — everything slows down. Sometimes it even breaks. Why? Throughput. Let’s take two re...
Join discussion
Jul 4, 2025 · 5 min read · Sled vs SQL vs Other Rust DB Crates (RocksDB, SeaORM, Rbatis) Recently, I needed to integrate a database into a Rust application. Exploring the ecosystem, I encountered several options: from traditional SQL-based crates like Diesel and SQLx, to embe...
Join discussion
May 31, 2025 · 2 min read · pool pool2 journal id blk seq lieu lock commit rollback mark free dbck tree genKey genStrKey useKey +relation +Any +Bag +Bool +Number +Date +Time +Symbol +String +Link +Joint +Blob +Hook +Hook2 +index +Key +Ref +Ref2 +Idx +Sn +Fold +IdxFold +Aux +UB ...
Join discussionMay 1, 2025 · 1 min read · +Aux - префиксный класс, поддерживающий вспомогательные ключи для +relation, в дополнение к индексам +Ref или +Idx. Ожидает список вспомогательных атрибутов того же объекта и объединяет все ключи в этом порядке в один ключ индекса. (rel nr (+Ref +Num...
Join discussion