This document discusses how to scale a database for millions of users. It recommends starting with a monolithic architecture for under 500,000 users and considering NoSQL for lower cost storage without ACID features. Above 500,000 users, the document recommends moving some functionality to NoSQL, adding caching, and using read replicas. It also discusses indexing best practices like avoiding type conversions and OR clauses in indexes. The document emphasizes monitoring indexes, avoiding local performance maxima by tuning both databases and applications, and identifying expensive queries for pre-computing or caching.