Link to video [Found this video very important, covers Bloom Filters]

Optimize writes in a database. Scaling this. Think of DB as a data structure. B+ Tree.

For scaling our database we want to :

Some ideas to do this :

  1. Condense data queries into a single query.
  2. In Linked List, write operations are efficient. So use logs. But in logs read operations are very slow. So, whatever information you get from the client, you sort it and then persist it so that reads are super fast.

Instead of sorting in the DB, keep sorted chunks.

Read operation is spread across blocks. So, we can speed this up using something called Bloom filters.

Bloom filters explained