Path

Learn how queries ask a data source a focused question and how Explore supports iteration.

Estimated time: 1 min

Queries

In this section, you’ll learn how a query asks a data source a focused question and how Explore helps you iterate on it.

  1. A query is the question Grafana sends to a selected data source. The query’s language and editor come from that data source plugin: Prometheus uses PromQL, Loki uses LogQL, SQL sources use SQL, and other plugins provide their own builders or code editors. The result is a focused dataset that Grafana can display, transform, or use in an alert rule.

    Explore is Grafana’s workspace for ad hoc querying and investigation. It is a good place to iterate on a query, inspect raw results, and move between metrics, logs, traces, or profiles before deciding that a view deserves a permanent panel. A panel can retain one or more queries; Explore supports the discovery work that produces them.

  2. Annotated Grafana panel query editor showing data source, query rows, options, and result controls

You learned that a query is the question sent to a data source and that Explore is the workspace where you iterate on queries before committing them to a panel.