All Products
Search
Document Center

E-MapReduce:Query management and analysis

Last Updated:Mar 26, 2026

EMR StarRocks Manager provides two pages for query diagnostics: SQL Tasks and Slow Queries. Use SQL Tasks to track all queries across your instance. Use Slow Queries to surface queries that exceed a duration threshold so you can pinpoint performance bottlenecks without manually scanning every completed query.

Prerequisites

Before you begin, ensure that you have:

How it works

SQL Tasks gives you a full view of all queries on your instance, split across two tabs:

  • Complete Tasks — queries that have finished, including those in the following states:

    State What it means
    Complete The query ran successfully.
    Execution failed The query encountered an error during execution. Check the SQL statement for logic errors or resource constraints.
    Invalid Syntax The query was rejected before execution due to a syntax error. Fix the SQL statement and resubmit.

    Filter by user, SQL type (DQL, DML, DDL, or DCL), or database to narrow results.

    Note

    Only the first 5,000 records from the previous 30 days are retained. To view the full query history, see Audit logs.

  • Running Tasks — large or complex queries currently in progress. These queries typically involve large-scale data processing, complex computations, or cross-database operations, and can consume significant CPU, memory, and I/O resources. Monitor this tab to catch resource-intensive queries before they affect overall system performance. Key metrics include: total scanned data volume, rows processed, CPU utilization, and memory usage.

Slow Queries surfaces queries that exceed a duration threshold, so you can identify performance bottlenecks without scanning all completed queries.

Note
  • The default minimum duration to qualify as a slow query is 5,000 ms.

  • Only SELECT statements are recorded as slow queries.

  • The page retains data for the previous 30 days or the latest 10,000 slow queries, whichever limit is reached first.

Open a query details page

From SQL Tasks

  1. Log on to the EMR console.

  2. In the left-side navigation pane, choose EMR Serverless > StarRocks.

  3. In the top navigation bar, select the region where your instance is deployed.

  4. Click StarRocks Manager, or click Connect in the operation column of your instance. For more information, see Use EMR StarRocks Manager to connect to an EMR Serverless StarRocks instance.

  5. In the left-side navigation pane, choose Diagnostics and Analytics > SQL Tasks.

  6. On the Complete Tasks or Running Tasks tab, find the query and click its ID.

From Slow Queries

  1. In the left-side navigation pane, choose Diagnostics and Analytics > Slow Queries.

  2. On the Slow Queries page, find the query and click its ID.

View query details

Clicking a query ID opens the query details page, which has three tabs:

Query Details

Displays the basic information about the query and the details of SQL statements.

Query Plan

After frontends (FEs) parse a SQL statement, they generate a query plan that specifies how operators — such as JOIN, ORDER, and AGGREGATE — are coordinated for execution. The Query Plan tab lets you examine this execution strategy before looking at actual runtime data.

Query Profile

After backends (BEs) execute the query, they generate a query profile: a detailed breakdown of time spent and data processed at each step. EMR StarRocks Manager allows you to analyze query profiles in a visualized manner.

Important

Query profiles are the primary tool for diagnosing slow queries. The query profile feature is enabled by default on EMR Serverless StarRocks instances. To check whether it is enabled on your instance, run:

SHOW VARIABLES LIKE '%enable_profile%';

Export query information

On the SQL Tasks or Slow Queries page, filter queries by status, duration, date range, or time consumption. Select the matching queries, then click Export to download the query information to your computer for further analysis.

What's next

  • Audit logs — access the full query history beyond the 5,000-record and 30-day retention limits of the SQL Tasks page.