All Collections
Atlas Frequently Asked Questions
Improving MongoDB Serverless Costs
Improving MongoDB Serverless Costs
Kabir Ghai avatar
Written by Kabir Ghai
Updated over a week ago

Are you currently using indexes today? By adding indexes to common queries you can limit the number of documents the database scans helping to lower your read and write counts and even improve your query performance. Without indexes, each query executed would need to scan every document in a collection - generating more reads or writes and potentially causing slower queries. We recommend you check the performance advisor to see if you have any suggested indexes you can create. You can also find more detail in this blog.


If you prefer a terminal experience, you can also analyze your queries by using the explain command to get better insights into the number of documents and index keys examined by a query. Explain can also show if the query uses index (IXSCAN) or (COLLSCAN), or is a covered query. See our documentation on Collection Scan versus Index Scan Use.

Did this answer your question?