UltipaDocs
Try Playground
  • Introduction
  • GQL vs Other Languages
    • Overview
    • Node and Edge Patterns
    • Path Patterns
    • Quantified Paths
    • Shortest Paths
    • Graph Patterns
    • Overview
    • Closed Graph
    • Open Graph
    • Graph Sharding and Storage
    • Constraints
    • Unique Identifiers
    • INSERT
    • INSERT OVERWRITE
    • UPSERT
    • SET
    • REMOVE
    • DELETE
    • Query Composition
    • Result Table and Visualization
    • MATCH
    • OPTIONAL MATCH
    • FILTER
    • LET
    • FOR
    • ORDER BY
    • LIMIT
    • SKIP
    • CALL
    • RETURN
    • Composite Query
    • NEXT
    • All Functions
    • Scalar Functions
    • Path Functions
    • Aggregate Functions
    • Mathematical Functions
    • Trigonometric Functions
    • String Functions
    • List Functions
    • Datetime Functions
    • Spatial Functions
    • Type Conversion Functions
    • Table Functions
    • AI & Vector Functions
    • Database Functions
  • Operators
  • Predicates
  • Expressions
    • Index
    • Full-text Index
    • Vector Index
  • Transactions
  • Triggers
  • Query Management
    • Variables
    • Values and Types
    • Comments
    • Reserved Words
    • Syntactic Notation
  • GQL Conformance
  1. Docs
  2. /
  3. ISO GQL

Query Management

GQL queries are executed as real-time operations. Results are returned to the client once execution is complete and are not stored on the server. The system tracks all running queries and provides commands to list and cancel them.

SHOW QUERIES

Lists all currently running queries. This command is never blocked by concurrency limits.

GQL
-- List all running queries
SHOW QUERIES

-- Equivalent
TOP QUERIES

-- Shorthand
TOP

Returns a table with the following columns:

FieldDescription
query_idThe unique identifier of the query (e.g., q1, q2).
query_textThe query text, truncated to 100 characters.
start_timeThe time the query started executing.
duration_msHow long the query has been running, in milliseconds.
statusCurrent state of the query: running or canceling.

KILL QUERY

Cancels a running query by its ID. The query transitions to canceling status and stops at the next cancellation checkpoint.

GQL
KILL QUERY 'q1'

Use SHOW QUERIES to find the query_id of the query you want to cancel.

Concurrency Control

The system uses separate concurrency limits for read and write queries:

Query TypeDefault SlotsDescription
Read16Queries that only read data (e.g., MATCH, aggregations).
Write4Queries that modify data (e.g., INSERT, DELETE, SET).

When all slots are occupied, new queries block until a slot becomes available or the query context is cancelled. Management commands (SHOW QUERIES, KILL QUERY) bypass the concurrency limits and always respond immediately.