Less Is More: Why Cost-Based Optimizer?

Less is more.
Less is more.
—  Ludwig Mies van der Rohe

This is no truer statement on the goals of a query optimizer. Do less: Less memory, less CPU, less disk, less IO, fewer instructions, fewer partitions, less overflow. Less everything for the query plan it creates. This is the guiding light for SQL and NoSQL optimizer.

You may also like: Cost-Based Optimzer for Couchbase N1QL (SQL for JSON)

In Couchbase 6.5, we announced the cost-based optimizer (CBO-preview) for N1QL in query service. Here, I’ve tried to answer the questions from NoSQL users unfamiliar with the benefits of CBO.