Why Is Elasticsearch So Slow? Fixing Slow Searches

Share
Workaround available Self-hosted, Elastic Cloud Updated November 15, 2026Based on 2 user reportsHow we research

Quick answer

Slow Elasticsearch searches usually come from too little filesystem cache, scripts, nested queries, too many fields or shards. Turn on the slow log and the profile API to find the expensive part first.

Most likely fix: Find the slow part

How to fix it

Try these in order — the most common fix is first.

  1. 1. Find the slow part

    1. Enable the search slow log
    2. Run the query with the profile API or Kibana Search Profiler (timings are relative)
    Did this fix it?
  2. 2. Fix the cluster

    1. Leave at least half of memory to the filesystem cache
    2. Use local SSDs where possible
    3. Set search.default_search_timeout
    Did this fix it?
  3. 3. Fix the query and mapping

    1. Denormalize instead of nested or join
    2. Combine fields with copy_to; map IDs as keyword
    3. Round dates like now-1h/m; avoid scripts
    4. Set a preference value so repeat searches hit the same shard copies
    Did this fix it?

Symptoms

Queries take seconds, timeouts under load, high CPU or I/O on data nodes.

Why it happens

  • Not enough RAM left for the filesystem cache
  • Scripts in sorting, aggregations or script_score
  • nested and parent-child joins
  • Querying many fields or very many shards
  • Unrounded dates that defeat the query cache
  • No search timeout set

This guide also covers

  • why is elasticsearch so slow
  • elasticsearch slow queries
  • elasticsearch search performance

Still not working?

If Elasticsearch keeps failing, you're not alone. See every Elasticsearch problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

The same problem in other apps

All slow, laggy or resource-hungry guides →

Other Elasticsearch errors

All 10 Elasticsearch errors and fixes →