---
title: "One query answers the agent’s whole question"
description: "An agent’s question mixes counting, grouping, joining, filtering and keyword, semantic and graph search. Infino runs all seven in one SQL statement over one open copy of the data on object storage. OpenSearch needs three calls."
canonical: https://infino.ai/blog/one-query-agent-engine/
published: 2026-12-03
---

# One query answers the agent’s whole question. Open format, petabyte scale.

By [Ekechi Nwokah](https://www.linkedin.com/in/ekechi/) and [Murali Krishna](https://www.linkedin.com/in/muralikpbhat/) · Dec 3, 2026 · engineering

Search is a table function, so one statement can count, group, join, filter and run keyword, semantic and graph search together. No second system, no stitching in application code. The indexes live inside open Parquet files on object storage: one copy of the data, which any Parquet reader reads as it is, grows to petabytes without a cluster to resize, and serves apps built on the OpenSearch API unchanged.

## An agent asks a question

How many errors last night mention disk full or look like a capacity incident, and are tied to last week’s outage? Which service had them, and which team owns it?

## It hides seven jobs

- count
- group
- join
- filter
- keyword search
- semantic search
- graph search

## Infino SQL runs all seven

```sql
SELECT   o.team, h.service, count(*) AS hits
FROM     hybrid_search(
           'logs', 'body', 'disk full',
           'embedding', :q, 1000
         ) AS h
JOIN     graph_walk('logs', 'incidents', [4521], 2, 5000) AS g
           ON g._id = h._id
JOIN     owners o ON o.service = h.service
WHERE    h.level = 'error'
  AND    h.ts > now() - interval '24 hours'
GROUP BY o.team, h.service
ORDER BY hits DESC;
```

## How OpenSearch answers the same question today

OpenSearch, standard engine: 3 calls

call 1 incidents index *graph*

Find last week’s outage and read the IDs of the logs linked to it. There is no graph traversal, so each further hop is another call.

agent passes the log IDs to call 2

call 2 logs index *keyword* *semantic* *filter* *count* *group*

One hybrid query: match “disk full” plus k-NN on “capacity incident”, filtered to errors from the last 24 hours and the IDs from call 1, with a terms aggregation by service.

agent passes the services to call 3

call 3 owners index *join*

Look up the team for each service. Query DSL can’t join, and the new analytics engine can join but can’t run the hybrid query from call 2.

agent matches each service to its team and writes the answer

OpenSearch with the analytics engine: 3 calls, 2 domains

call 1 incidents index *graph*

Same as the standard engine: find the outage and read the linked log IDs, one call per hop.

agent keeps the outage log IDs

call 2 logs, general-purpose domain *semantic*

k-NN on “capacity incident”. The analytics engine has no vector type, so this runs on a second domain that holds its own copy of the logs, and returns the k nearest log IDs.

agent passes both ID lists to call 3

call 3 logs + owners, analytics domain *keyword* *filter* *join* *count* *group*

One SQL query: logs that match “disk full” or are in call 2’s IDs, errors from the last 24 hours, in call 1’s IDs, joined to owners and counted by team and service. “disk full” works here only as a filter: the analytics engine doesn’t score matches.

Infino: 1 call

call 1 query.sql above *all seven jobs*

One SQL statement runs the keyword, semantic and graph search, the filter, the join to owners, and the count by team and service. The agent gets the finished answer back.

❯ infino bench

### *Faster* keyword search.

Infino **0.46×**

Lucene **1.00×**

Top-k latency relative to Lucene over 962 queries on 5M Wikipedia documents. Infino is 54% faster. [the benchmark →](https://infino.ai/benchmarks/search-benchmark-game/)

### *Faster* vector search.

Infino **7,741 QPS**

OceanBase **5,846 QPS**

Queries per second at recall ≥ 0.95 over 1M Cohere vectors, higher is better. Infino ranks first at 10M too, with 4,210 QPS to Milvus’s 2,517. On the Open Vector Database Benchmark, which we run and publish. [the board →](https://infino.ai/open-vdbbench/)

### *Faster* SQL.

Infino **12.7 vCPU-s**

Snowflake **16.6 vCPU-s**

Databricks **28.0 vCPU-s**

vCPU-seconds per query over 100M rows, lower is better. Infino on ClickBench, Snowflake and Databricks on CostBench. [how it is measured →](https://infino.ai/pricing-methodology/)

## Running it

|             | OpenSearch                         | Infino                                                      |
| ----------- | ---------------------------------- | ----------------------------------------------------------- |
| Data copies | One per engine or domain, plus ETL | 1, in S3                                                    |
| Ops         | Shards on nodes with replicas      | Disposable nodes that rebuild from S3, or query S3 directly |
| Cost        | Baseline                           | Often up to 10x lower                                       |
| Moving over | n/a                                | Speaks the OpenSearch API, with one-click migration         |

## What each engine does

|                     | full-text                                                          | analytics                                          | vector                                   | agents                                                                                           |
| ------------------- | ------------------------------------------------------------------ | -------------------------------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------ |
| Workload            | Find and rank documents                                            | Scan and aggregate billions of log rows            | Semantic search for RAG                  | One question needing all three at once                                                           |
| Engine built for it | Lucene                                                             | Column stores                                      | Vector databases                         | Infino                                                                                           |
| Elasticsearch       | Lucene                                                             | ES\|QL compute engine. Parquet engine in prototype | Lucene (HNSW)                            | 2+ calls to 2+ engines, stitched together by the agent                                           |
| OpenSearch          | Lucene                                                             | New analytics engine (DataFusion)                  | k-NN plugin: FAISS by default, or Lucene | 3 calls across indices and domains, stitched together by the agent                               |
| PostgreSQL          | pg\_search extension (BM25). Built-in full-text ranks without BM25 | Row store, columnar through extensions             | pgvector extension                       | 1 call, with extensions (Apache AGE for graph), on one server’s disk, hard to scale out          |
| DuckDB              | fts extension (BM25). The index is rebuilt by hand after changes   | Columnar, reads Parquet on S3                      | vss extension (HNSW), held in memory     | 1 call, with extensions (DuckPGQ for graph), in one process, indexes kept apart from the Parquet |
| Infino              | ✅                                                                  | ✅                                                  | ✅                                        | 1 call to 1 engine, indexes inside Parquet on object storage                                     |
