What Causes Immich Search or Query Results to Slow as Data Grows?

Eva Wong is the Technical Writer and resident tinkerer at ZimaSpace. A lifelong geek with a passion for homelabs and open-source software, she specializes in translating complex technical concepts into accessible, hands-on guides. Eva believes that self-hosting should be fun, not intimidating. Through her tutorials, she empowers the community to demystify hardware setups, from building their first NAS to mastering Docker containers.

Immich search slows with growth when larger indexes and working sets exceed efficient cache, filtering, or storage behavior—not simply because photos exist.

A larger library increases several quantities at once: rows, embeddings, metadata, thumbnails, and possible filter combinations. Diagnose the stage that slows, because faster file storage cannot repair a poor query path, while database tuning cannot accelerate a remote thumbnail mount.

Growth Expands More Than the Original Library

Each added asset can contribute database rows, extracted metadata, search representations, faces, thumbnails, and encoded media. These structures grow at different rates and are accessed differently. Original-library terabytes therefore cannot predict search latency without knowing how many searchable entities and derived objects the request traverses.

The ZimaSpace Immich data-path analysis separates background processing, searchable representations, database selection, and delivered media. Its practical lesson for query diagnosis is that library growth changes both the searchable catalog and the files presented after a result, creating more than one potential delay.

Record asset count, database size, vector-index size, thumbnail footprint, and the cardinality of frequently used filters at each milestone. A time series reveals which structure grows alongside latency and prevents an unrelated increase in original video bytes from being blamed for database selection time.

Vector Indexes Become Sensitive to Memory Fit

Semantic search traverses a representation index rather than reading every original image. As that index grows, its active graph or pages may no longer remain resident in memory. Random cache misses then turn memory-speed work into storage reads, making tail latency rise more sharply than average CPU utilization suggests.

An engineering analysis of PostgreSQL vector search explains that HNSW performance can degrade when the active graph outgrows memory because random-access traversal becomes sensitive to cache misses. Immich versions and index implementations can change, so use this as a mechanism to test rather than a configuration prescription.

Measure a fixed semantic query after restart, after one warm-up, and after touching unrelated library regions. Compare database reads, cache hit behavior, and device latency. Strong warm gains that disappear as the working set broadens support a memory-fit hypothesis; uniformly slow queries point elsewhere.

Filters and Query Plans Can Change With Cardinality

Date, person, owner, album, and other conditions change how many candidates remain before or during ranking. As data distribution changes, the same visible filter can select a much larger fraction of the library. Database statistics and plan choices can therefore matter even when the search term itself is unchanged.

A pgvector limitations review notes that combining vector search with metadata filters can be difficult and that vector workloads share PostgreSQL CPU, memory, and I/O with transactional work. The article is general PostgreSQL evidence, so it supports the mechanism rather than proving one Immich query plan.

Create paired searches with and without one filter, using known result sets. Capture server-side query timing and database activity, not only browser completion. If selection time grows while returned thumbnails remain fast, focus on plans, statistics, index fit, and contention instead of media storage.

-15% OFF
Single board computer zimaboard2

Separate Result Selection From Result Rendering

The interface can feel slow after the database has already selected matching asset identifiers. Rendering still requires thumbnail lookup, storage reads, response transfer, and client decode. A growing derivative tree or remote mount can delay this second phase while the actual search query remains healthy.

A large-import report describes broad Immich slowness while hundreds of thousands of metadata and thumbnail jobs remained queued. It demonstrates overlapping background pressure, not a universal scale limit, and shows why growth tests should run both with queues active and after they have drained.

Use browser timing or API observations to mark result-response completion separately from the last visible thumbnail. Repeat a known search with queues paused, then active. If identifiers slow, investigate database and index paths; if only images slow, inspect thumbnail storage, network delivery, client decode, and competing background I/O.

Tech & AI HUB

More to Read

Get More Builds Like This

Stay in the Loop

Get updates from Zima - new products, exclusive deals, and real builds from the community.

Stay in the Loop preferences

We respect your inbox. Unsubscribe anytime.