0Pricing
Erlang OTP: Distributed & Fault-Tolerant Systems Programming · Lesson

Mnesia Indexing & Query Optimization

Speed up Mnesia reads with secondary indexes, QLC queries, and smart table type choices to keep distributed lookups fast.

The Cost of Scanning

By default Mnesia can find a record fast only by its primary key. Searching by any other field forces a full table scan — slow on large tables. Indexes and queries fix this.

Secondary Indexes

A secondary index lets Mnesia look up records by a non-key field in roughly constant time, at the cost of extra storage and slightly slower writes.

All lessons in this course

  1. Mnesia Fundamentals & Schema
  2. Transactions & Data Manipulation
  3. Distributed Mnesia & Replication
  4. Mnesia Indexing & Query Optimization
← Back to Erlang OTP: Distributed & Fault-Tolerant Systems Programming