<a id="lightning-tables-query-overview"></a>

# Lightning Table Queries in Confluent Cloud

Lightning Table queries read your topic data with sub-second response
times. You can run them in the Confluent Cloud Console, through an HTTP API, or
with a Model Context Protocol (MCP) client.

#### IMPORTANT
Lightning Tables are rolling out to Confluent Cloud accounts in phases. If
you don’t see this feature, it’s not available for your account at
this time.

<a id="lightning-tables-query-definition"></a>

## What is a Lightning Table query

A *Lightning Table query* reads data from the Lightning Table for an
Apache Kafka® topic. Confluent Cloud updates the Lightning Table within 100 milliseconds of
new data arriving in the topic. The Lightning Table persists independently
of the topic’s retention policy. As a result, a Lightning Table query
can return data that has already aged out of the topic.

A Lightning Table query runs once and returns a result. In that
respect, it works like a [snapshot query](../../flink/concepts/snapshot-queries.md#flink-sql-snapshot-queries) in Apache Flink®. But a Lightning Table query
targets a different performance profile: sub-second response times
and high concurrency for point lookups, range scans, and full scans. A
snapshot query is better suited to complex, exploratory analysis over
historical data.

The following table compares a Lightning Table query with Flink
snapshot and streaming queries.

| Query type            | How it runs                                                                  | Use it for                                                                                                       |
|-----------------------|------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| Lightning Table query | Runs once and returns a result in less than a second.                        | Point lookups, range scans, and full scans from many concurrent<br/>clients, such as applications and AI agents. |
| Snapshot query        | Runs once, returns results, and exits.                                       | Complex, exploratory analysis over historical data.                                                              |
| Streaming query       | Runs continuously and returns results incrementally as new data<br/>arrives. | Processing data continuously as it arrives.                                                                      |

A Lightning Table query reads the Lightning Table instead of the topic.
So its results might differ from the results of a Flink streaming
or snapshot query on the same topic.

For more information about Flink queries, see
[Batch and Stream Processing in Confluent Cloud for Apache Flink](../../flink/concepts/batch-and-stream-processing.md#flink-sql-batch-and-stream-processing).

## Related content

- [SQL Reference for Lightning Table Queries in Confluent Cloud](sql-reference.md#lightning-tables-sql-reference)
- [Manage Lightning Tables in Confluent Cloud](../manage.md#lightning-tables-manage)
- [Lightning Tables in Confluent Cloud](../overview.md#lightning-tables-overview)

#### NOTE
This website includes content developed at the [Apache Software Foundation](https://www.apache.org/)
under the terms of the [Apache License v2](https://www.apache.org/licenses/LICENSE-2.0.html).
