# executionStats

*noun*

say it: **“ek-sih-KYOO-shun STATS”** **/ˌɛksɪˈkjuʃən ˈstæts/**

The part of a MongoDB explain() report that counts how much work a query did, such as how many documents it read and how long it took.

## What does **executionStats** in an explain report tell you?

**executionStats** is the part of `explain("executionStats")`'s report that counts a query's work: `nReturned` (documents returned), `totalKeysExamined` (index entries read), `totalDocsExamined` (documents read) and `executionTimeMillis`. A well-indexed query reads about as many as it returns.

```javascript
db.orders.find({ customerId: 31 }).explain("executionStats").executionStats;
// { nReturned: 12, executionTimeMillis: 1, totalKeysExamined: 12, totalDocsExamined: 12, ... }
```

## In a sentence

- “The **executionStats** said 50,000 documents examined for 12 returned, so the query needed an index.”
- “After the new index, **executionStats** showed 12 keys examined and 12 documents.”

Level: Freelancer · [More MongoDB terms at this level](https://www.ask-codey.com/glossary?category=mongodb&level=4)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/executionstats
