Low perf on regex search even on M50 instance

Hi,

We just migrated our old on-prem 4.2 cluster to Atlas 7.0 on GCP, M50 tier.

Performances are good overall but a specific query is not performing as expected.
It’s a $regex query on 3 or 4 text fields. We know :

  • it’s not optimized
  • we should use fulltext if possible
  • we could benefit from using atlas search
  • switch to shard (yes, we’re still using a replicaset configuration)

but the point is that this same query on the very same data was working “correctly” on our old cluster, but it is limited by CPU on Atlas M50 instance.
Because it’s a single request, it’s bound to a single core, so increasing the number of core is not the point.

Is there anything people are thinking about that could explain performance are so bad on this specific $regex query compared to a very old cluster ? Support, by chat, told me that which instance are used by a given tier is not a public information.

Hi, welcome to MongoDB Community.

Can you share the query and an example of the data?

If possible, send an explanation of the query as well.

In general, the ideal is to benefit from Atlas Search, which could exponentially reduce query times.

There is no public information about the families used for clusters. M10 and m20 are shared instances and from that point on they are not shared.