Running Static Analysis
Static analysis catches issues before your query runs.- Navigate to Data Portal → Query Console
- Write or paste your SQL query
- Select Analyze → Static Analysis
Running Runtime Analysis
Runtime analysis identifies issues after your query runs, using real execution statistics. Each risk flag includes the operator metrics and any correctness alerts relevant to that finding.- Write your SQL query in the Query Console
- Select Analyze → Runtime Analysis
Acting on Recommendations
Index additions — Apply through Data Portal → Table Management. Index changes require a segment reload to take effect on existing data. Query rewrites — Apply directly in the Query Console editor. The recommendation shows a before/after diff. Query hints — Added inline to your SQL using/*+ ... */ syntax. Take effect immediately without schema changes.
For a full breakdown of what each output field and recommendation type means, see Understanding Recommendations.
Using the API
Both analysis modes are available as REST endpoints on the StarTree Cloud data-manager service. Use these when integrating Query Analyzer into CI pipelines, query validation tooling, or custom dashboards.Prerequisites
- A valid StarTree Cloud API token (Bearer auth)
- The workspace ID for your environment (obtain from the Data Portal URL or your account team)
- Query Analyzer must be enabled for your environment
Static Analysis via API
POST /api/query-analyzer/static-analysis
Analyzes a SQL query using table metadata and explain plan only — no query execution required.
Runtime Analysis via API
POST /api/query-analyzer/runtime-analysis
Executes the query against your Pinot cluster, collects execution statistics, then runs analysis with evidence-backed findings.
Optional Request Parameters
Both endpoints accept the following optional fields in the request body:
For the full request and response schemas, see the API Reference.
Tips
- Use real queries: Query Analyzer uses column cardinality and table size to produce accurate recommendations. Simplified test queries produce weaker results.
- Static first, runtime second: Static analysis is faster. Use runtime analysis for your most important or problematic queries.
- Read the tradeoffs: Every recommendation includes tradeoffs, for example, an index that helps one query pattern may not justify the storage cost.

