Faster Database Troubleshooting with Grafana Assistant: Q&A

By

Welcome to this Q&A guide on using the new Grafana Assistant integration for Database Observability. If your database is running slow, this AI-powered tool helps you diagnose and resolve issues quickly—without leaving your Grafana Cloud environment. Below, we answer common questions about how it works, what it analyzes, and how to use it effectively. Use the links to jump to specific insights.

What is Grafana Assistant and how does it integrate with Database Observability?

Grafana Assistant is an AI‑powered feature within Grafana Cloud Database Observability. It helps you analyze slow queries, confusing wait events, and performance bottlenecks without manually assembling context. The Assistant runs directly against your live Prometheus and Loki data sources, using the exact time window, table schemas, indexes, and execution plans you’re currently investigating. No copy‑pasting SQL into a separate AI tool. Each analysis tab provides purpose‑built actions designed by database engineers—not generic prompts. For example, you can click a button labeled “Why is this query slow?” and the Assistant immediately synthesizes data from multiple sources to give you a clear diagnosis and specific advice.

Faster Database Troubleshooting with Grafana Assistant: Q&A

How does the Assistant use real data instead of requiring copy‑pasted SQL?

Instead of relying on a static copy of your SQL, the Assistant queries your actual Prometheus and Loki data sources in the selected time window. It automatically loads your real table schemas, indexes, and execution plans. This means the analysis is always based on the current state of your database. The Assistant doesn’t need you to explain the schema, describe time ranges, or assemble context. It retrieves everything automatically from the observability data already collected. This approach ensures the advice is accurate and actionable, because it’s rooted in live metrics and logs rather than isolated snippets.

What pre‑built analysis actions are available?

The integration includes several out‑of‑the‑box AI buttons that provide a guided troubleshooting experience. Key actions include:

These actions are designed by database engineers, so they focus on the most common causes of poor performance. You can still use the free‑text chat box for custom prompts, but the pre‑defined buttons offer a fast path to answers without needing to craft the perfect question.

Can you walk through an example diagnosing a slow query?

Suppose you see a query with a P99 latency spike and rising error rate in the overview. You click into its detailed view and open the Assistant with the “Why is this query slow?” button. The Assistant queries both Prometheus and Loki for that time window and produces a health assessment. It highlights that the number of rows examined is 50 times the rows returned, meaning most work is wasted on filtering. It also notes that the P99 is 12 times the median, indicating an intermittent problem. CPU time looks healthy, but wait events consume 40% of execution time. These insights come directly from your live data, not from generic estimates.

How does the Assistant explain confusing wait events?

Wait events like wait/synch/mutex/innodb or io/table/sql/handler can be cryptic. The Assistant interprets these names against your actual database activity. It not only identifies the wait event but explains what the database is doing during that wait—for example, “During this wait, the database is physically waiting for I/O completion from the storage layer.” By correlating wait event names with your schema and execution plan, the Assistant translates technical jargon into meaningful diagnostics, helping you decide whether the fix lies in indexing, query rewriting, or hardware upgrades.

Is my query data safe and private when using the Assistant?

Yes. The Assistant uses your query text and schema metadata only for the current analysis. This data is not stored and is not used for model training. Each analysis runs in isolation, ensuring that sensitive database details never leave your environment permanently. Grafana Cloud’s observability capabilities are designed with privacy in mind, so you can use the AI features confidently, knowing your data remains under your control.

How do I access the Assistant and start troubleshooting?

Accessing the Assistant is straightforward. In the Grafana Cloud Database Observability interface, navigate to any query’s detailed view. You’ll see an icon or button to open the Assistant (typically labeled with a chat or AI icon). From there, you can either click pre‑built analysis buttons (e.g., “Why is this query slow?”) or type your own question in the chat box. The Assistant immediately pulls data from your connected Prometheus and Loki sources for the current time window. There’s no setup beyond ensuring your database observability integration is already configured. Start with a slow query and let the Assistant guide you to the root cause.

Related Articles

Recommended

Discover More

Beyond Content Filtering: How TealTiger v1.2 Enforces AI Agent Governance with Deterministic Policy Evaluation6 Key Takeaways from Apple’s Earnings: iPhone 17 Demand Soars Despite Supply HurdlesMastering FreeCAD 1.1: A Beginner's Guide to Part Design with Clear InstructionsSpring Thaw on the Kuskokwim: Ice Breakup Near Aniak, Alaska10 Ways Go Optimizes Performance with Stack Allocation