Why doesn't my archived collection have any indexes?

I have a collection that’s archived to Online Archive based on a date field. So a portion of the documents is on the live cluster and a portion is archived (millions on both sizes).

When I connect to the DB via mongosh using the Cluster AND Archive connection, how come the getIndexes() gives me an empty array (i.e. no indexes). The cluster-only connection gives me 3 indexes. Also, when setting up the archive I specified 2 partition fields. So why aren’t there any indexes when using the combined connection? Small wonder even the most basic find query is painfully slow.

Hi @Zarif_Alimov ,

I believe the reason why the indexes are only shown in the cluster connection as MongoDB indexes only exist in the live cluster. The common connection will only show objects and definition that are true to both storages.

The online archive is based on a MongoDB data lake managed by MongoDB. This technology uses the storage clustering of data (into directories and paths) as an “indexing” mechanism and does not actually creating indexes (the same way you are familiar on mongodb).

Now to better assist you with the performance issue. Can you share the query and query time compared on Atlas clusters and online archive?

Additionally, can you share the cluster link with us to have a better look into the specific configs.

Thanks,
Pavel

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.