Skip to main content
Proactive analysis needs Query Analyzer, which is off by default. Contact your StarTree account team to have Query Analyzer enabled. Once it’s on and the checks below pass, proactive analysis runs by itself. There’s nothing to set up.

What has to be on

Open Monitoring → Query Insights in the Data Portal and go to the Insights tab. Until every check passes, the tab shows a checklist of what has to be on. Fix anything marked off, then click Check again. Fingerprinting matters because proactive analysis groups queries by shape (the queryHash column in system_query_log). Without it there’s nothing to rank, so scheduled runs are skipped. Once every check passes, proactive analysis runs every day at 09:00 UTC with the defaults in the settings reference. You don’t need to add Slack or email: results show on the Insights tab. To save settings, start a run or send a test, you need permission to change settings and permission to query system_query_log. Viewing runs and recommendations only needs query access to system_query_log.

Change the settings

1

Open the settings

On the Insights tab, click Settings. With no destination saved, the banner’s Add Slack or email opens the same dialog.
2

Pick a schedule

Under Runs, choose Daily, Every 6 hours or Weekly, then the day and time. Until you change it, runs are daily at 09:00 UTC. A time you pick is saved in your browser’s time zone, so 09:00 stays 09:00 across daylight saving changes.
3

Choose where digests go (optional)

Slack and email are both optional. Without either, results only show on the Insights tab, and a banner there says so. To get a digest after each run, turn on Slack, Email or both.
  • Slack: paste an incoming webhook URL for the channel you want. To get one, see How to create a Slack incoming webhook. The URL must start with https://hooks.slack.com/. After saving, it’s shown masked.
  • Email: add up to 20 recipients, separated by commas or by pressing Enter after each one. If the dialog says email isn’t set up for your environment, contact StarTree support, or use Slack in the meantime.
A destination you turn on needs a webhook or at least one address. Turn it off if you don’t want it.Use Send test to check a destination before you save. A test saves nothing and isn’t recorded as a run.
4

Set what gets analyzed

Only queries slower than sets the latency floor, in milliseconds. Queries per run caps how many of the slowest query shapes each run analyzes. Each analysis is one LLM call, so this cap is also your cost cap.
5

Save

Click Save changes. The tab shows when the next run is. Click Run now if you don’t want to wait for it.

Turn it off

Turn off, in the same dialog, stops scheduled runs, and the tab shows the checklist again with Turn on. Your settings and earlier runs are kept: Turn on starts again on the same schedule with the same destinations, and the earlier runs show again.

The Insights tab

While proactive analysis is on, the tab shows the last and next run, the number of open recommendations, how many queries were analyzed, and where digests go. Below that are two views.
  • Timeline: every run, scheduled or manual, with what it ranked, analyzed, skipped as unchanged or failed, and whether each digest was delivered. A failed delivery shows the error, for example Slack failed (404 no_service). The last 50 runs are kept.
  • Recommendations: open fixes for queries that were slow in the last 7 days, filterable by table and type. Each one shows its impact and confidence. When the fix is a rewrite, you can open the rewritten query in Query Console. It opens without running.

Settings reference

Slack and email are both optional. Runs and their results show on the Insights tab either way. Each run looks back over the time since the previous scheduled run. On a daily schedule that’s the last 24 hours, and on a weekly one it’s the last week.

API

All endpoints are under /api/query-analyzer/proactive. A PUT /config body looks like this. slack and email are optional:

Current limitations

  • One cluster, one set of settings. Settings apply to the whole cluster. You can’t set different schedules or destinations per workspace or table.
  • No automatic changes. The digest and recommendations point someone at the work. Proactive analysis never files tickets or changes table config by itself.
  • Email depends on the environment. If email isn’t set up for your environment, saving with email recipients fails with “Email can’t be sent from this environment.” Use Slack, or ask StarTree support to turn email on.

Proactive Analyzer Overview

What proactive analysis does and how it picks queries.

Query Logger

The system_query_log table that proactive analysis reads.