KeplerGrid guide

Check MongoDB collection size, document count, and index storage

Hover over a collection in the KeplerGrid database browser to see its document and storage statistics. Compare logical data size with allocated document storage and index storage separately.

Open the statistics beside the collection

On your active MongoDB connection, expand the database and hover over the target collection. You can also move keyboard focus to its row. After a short pause, the tooltip loads the metrics MongoDB returned. Hover over the database row to see database-level statistics.

  • Approx. documents is MongoDB’s reported metadata count for the collection. For a filtered count, run Count documents in Documents.
  • Data size is the logical size of the documents. Storage used is the space allocated for document storage, which can differ because of compression and free space in storage files.
  • Index storage is the total storage for indexes, separate from document storage. Indexes counts the index definitions, including the default _id index for ordinary collections.
KeplerGrid shows 36 approximate documents and separate data, storage, and index sizes for the practice orders collection
Hover over the practice collection to read its document estimate and its separate size measurements. Storage figures vary by server.

Compare 36 orders with a five-order sample

Load the 36 synthetic orders first. On the same disposable server, run the following once in mongosh to write the five cancelled orders to a new practice collection.

const lab = db.getSiblingDB("keplergrid_query_lab")
const cancelled = lab.orders.find({ status: "cancelled" }).toArray()
lab.order_sample.insertMany(cancelled)

On your read-only practice connection in KeplerGrid, refresh the database browser if the new collection is missing. Hover over orders and then order_sample. On this unchanged standalone fixture, the tooltip reports 36 and five documents. Expect the logical data size to be smaller for the sample. Both collections can have similar allocated storage or index storage even with different counts. Use Explain to investigate query performance.

Check the active connection and permissions

First select the connection you want to inspect. If the tooltip shows an error, confirm the connection is active and the account can read the applicable collection or database statistics. MongoDB controls access to those commands. An absent metric means the panel has no value to display.

KeplerGrid can reuse a tooltip result for up to 20 seconds. After changing the data, wait for that window to pass and move focus or the pointer off the row and back to sample it again.

Use Server health when you need connections or operations per second instead of collection-level storage.

Next, Expire MongoDB documents with a TTL index.

Rename a MongoDB collection safely