Documentation

View the query log

The query log records queries executed on your InfluxDB Cloud Dedicated cluster. Use it to monitor query performance, find slow-running queries, and troubleshoot failed executions.

Query logging is not enabled by default

The query log is disabled by default on all clusters because it generates additional ingest and storage overhead and is intended primarily for troubleshooting, not continuous monitoring. To enable it for your cluster, contact InfluxData support.

Use the Admin UI or the influxctl query command to view the query log.

Access the InfluxDB Cloud Dedicated Admin UI at console.influxdata.com. If you don’t have login credentials, contact InfluxData support.

  1. Open the cluster you want to inspect and go to Query History.

If query logging is enabled for your cluster, any admin user can access the query log in the Admin UI automatically; no database token is required.

In Query History you can:

  • Search by Database Token ID to see queries run with a specific token.
  • Filter by:
    • Status (for example, success, failure)
    • Database
    • Query type (for example, SQL, InfluxQL)
    • Source (for example, User Queries, UI)
    • Time range (for example, last 24 hours)

The table lists each query with its status, query text, database, query type, duration, and timestamp. You can use the column headers to sort (for example by duration or time).

Query History list view in the Admin UI with search, filters, and table

You can also expand a row to see more details about that execution.

Query History detail view in the Admin UI

Use the influxctl query command to run SQL against the _internal database and query_log table. Query log entries are stored in the _internal database.

  1. If you haven’t already, download and install the influxctl CLI, and then configure an influxctl connection profile for your cluster.
  2. Create a database token that has read access to the _internal database. Replace DATABASE_TOKEN in the examples below with your database token.
  3. Run the query subcommand with --database and --language (and optionally --config). Global flags such as --config must come before the command; query flags such as --database, --language, and --token must come after query.

Examples

List recent successful queries with compute duration above a threshold (for example, 0.6 ms):

influxctl query \
  --token 
DATABASE_TOKEN
\
--database _internal \ --language sql \ 'SELECT * FROM query_log WHERE success = '\''true'\'' AND compute_duration_ns > 600000 LIMIT 10'

Filter by namespace (database) and time range:

influxctl query \
  --token 
DATABASE_TOKEN
\
--database _internal \ --language sql \ 'SELECT * FROM query_log WHERE namespace_name = '\''my_database'\'' AND time >= now() - INTERVAL '\''1 day'\'' LIMIT 50'

Example output:

| auth_id        | compute_duration_ns | phase   | query_type | query_text                                              | success | time                    |
|----------------|---------------------|---------|------------|---------------------------------------------------------|---------|--------------------------|
| token-id-xxxx  |             2314333 | success | sql        | SELECT * FROM query_log WHERE success = 'true' AND ...  | true    | 2026-02-25T00:30:30Z     |
| token-id-yyyy  |          3673637621 | success | sql        | SELECT * FROM my_measurement WHERE time > now() - ...  | true    | 2026-02-25T00:28:57Z     |
| token-id-yyyy  |          1443145654 | success | sql        | SELECT COUNT(*) FROM query_log WHERE ...                | true    | 2026-02-25T00:29:02Z     |
+----------------+---------------------+---------+------------+---------------------------------------------------------+---------+--------------------------+

Query log data and columns

The query_log table in _internal includes the following columns:

ColumnData typeDescription
timetimestampTimestamp when the query log entry was recorded
idstringUnique identifier for the query
namespace_idstringInternal identifier for the database
namespace_namestringName of the database where the query was executed
query_typestringType of query syntax used (sql, influxql)
query_textstringThe actual query statement text
query_paramsstringQuery parameters (if applicable)
auth_idstringDatabase token ID used to authenticate the query
trace_idstringTrace ID for debugging and monitoring
successstringQuery execution status ('true' or 'false' as string)
runningstringIndicates if query is currently running ('true' or 'false' as string)
phasestringCurrent query phase (for example, received, planned, permit, success, fail, cancel)
query_issue_time_nsint64Time when the query was issued (nanoseconds)
permit_duration_nsint64Time spent waiting for query permit (nanoseconds)
plan_duration_nsint64Time spent planning the query (nanoseconds)
execute_duration_nsint64Time spent executing the query (nanoseconds)
end_to_end_duration_nsint64Total end-to-end query duration (nanoseconds)
compute_duration_nsint64Compute time for the query (nanoseconds)
partition_countint64Number of partitions accessed
parquet_file_countint64Number of Parquet files read
max_memory_bytesint64Maximum memory used during query execution (bytes)

Use string literals for status columns

In the query_log table, success and running are stored as strings ('true' or 'false'), not booleans. In SQL predicates, use string comparison—for example, success = 'true' or running = 'false'—to avoid type coercion errors.


Was this page helpful?

Thank you for your feedback!


New in InfluxDB 3.8

Key enhancements in InfluxDB 3.8 and the InfluxDB 3 Explorer 1.6.

See the Blog Post

InfluxDB 3.8 is now available for both Core and Enterprise, alongside the 1.6 release of the InfluxDB 3 Explorer UI. This release is focused on operational maturity and making InfluxDB easier to deploy, manage, and run reliably in production.

For more information, check out:

InfluxDB Docker latest tag changing to InfluxDB 3 Core

On April 7, 2026, the latest tag for InfluxDB Docker images will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments.

If using Docker to install and run InfluxDB, the latest tag will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments. For example, if using Docker to run InfluxDB v2, replace the latest version tag with a specific version tag in your Docker pull command–for example:

docker pull influxdb:2