Tensorum
YouTubeसीखना शुरू करें

Storage Engines और Indexing

Databases असल में bytes को disk पर कैसे रखते हैं — और यह आपके डिज़ाइन को क्यों आकार देता है।

Distributed Systemsएडवांस्ड6 घंटे4 मुख्य विचार · 5 लागू डिज़ाइन
0%
आपकी प्रगति

प्रॉब्लम और केस स्टडी के नाम, कोड और तकनीकी कीवर्ड अंग्रेज़ी में ही रखे गए हैं।

सार

Databases असल में bytes को disk पर कैसे रखते हैं — और यह आपके डिज़ाइन को क्यों आकार देता है।

मुख्य विचार

  • B-trees जगह पर ही update करते हैं: बेहतरीन reads, random writes पर write amplification।
  • LSM trees append और compact करते हैं: शानदार write throughput, read amplification Bloom filters से कम होता है।
  • Inverted indexes full-text search चलाते हैं; HNSW graphs approximate nearest-neighbour vector search चलाते हैं।
  • MVCC पुराने versions रखता है ताकि readers कभी writers को न रोकें — और time-travel queries संभव हों।

Trade-offs

  • Compaction I/O के लिए foreground traffic से होड़ करता है।
  • Vector indexes latency और memory के बदले recall घटाते हैं।

असल दुनिया में

RocksDB (LSM)PostgreSQL (B-tree + MVCC)LuceneFAISS / pgvector

कीवर्ड

LSMB-treeInverted indexHNSWMVCC