Multi-get vs Terms query performance

I'm using Elasticsearch 7.16.2 and for one of my use-cases I need to fetch documents out of my Elasticsearch index in batches of 200 to 400 at a time. Each document is around 40k on disk but I only fetch certain fields, which cuts the document size in half.

I had implemented this as a "terms" query on a keyword field and the performance was ok but I thought a Multi-get would be faster because it could grab each document directly. However when I made the change to Multi-get, I saw my response times double in every percentile.

I'm wondering if there is an explanation for this or whether it is expected? And whether there is a way to evaluate where the bottlenecks are in my Multi-get request to make it faster?

Hi @CletusTSJY,

Have you tried running your query through the search profiler? That could give you a good way of evaluating your queries

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