SQL Playground
Beacon’s SQL Playground provides an interactive environment for writing, executing, and inspecting queries directly within the platform. It allows users to explore data, test query variations, examine execution behavior, and validate optimizations — without leaving the observability interface.
This module answers the question: “How does this query actually behave when I run it, and what happens if I change it?”
Capabilities
Section titled “Capabilities”1. Interactive Query Editor
Section titled “1. Interactive Query Editor”Beacon provides a full-featured editor for composing and running queries.
| Capability | Description |
|---|---|
| Syntax Awareness | Visual highlighting of query structure as you type. |
| Auto-Formatting | Consistent, readable query formatting. |
| Multi-Statement Support | Compose and run multiple statements in sequence. |
| Query History | Access previously executed queries. |
| Saved Queries | Store frequently used queries for reuse. |
| Comment Support | Annotate queries for clarity and documentation. |
Operational value: Provides a comfortable, efficient environment for query work without switching tools.
2. Query Execution
Section titled “2. Query Execution”Beacon executes queries against selected database instances and returns results promptly.
| Capability | Description |
|---|---|
| Instance Selection | Choose which database to run against. |
| Execution Controls | Start, cancel, and re-run queries. |
| Result Display | Tabular presentation of returned data. |
| Row Count & Timing | Summary of how many rows were returned and how long it took. |
| Error Reporting | Clear, contextual display of execution errors. |
Operational value: Enables quick, iterative query testing directly where performance analysis happens.
3. Execution Plan Integration
Section titled “3. Execution Plan Integration”Queries run in the Playground can be immediately analyzed through Beacon’s plan visualization.
| Capability | Description |
|---|---|
| Plan on Demand | Generate the execution plan for a query without leaving the editor. |
| Inline Plan Access | Open the visual plan directly beside the query. |
| Plan Comparison | Compare plans across query variants. |
| Cost Preview | See estimated cost before or after execution. |
Operational value: Connects query authoring to query analysis in a single, seamless workflow.
4. Query Performance Metrics
Section titled “4. Query Performance Metrics”Beacon measures and displays the performance characteristics of each execution.
| Signal | Description |
|---|---|
| Execution Duration | How long the query took to run. |
| Rows Returned | Number of rows produced. |
| Rows Scanned | How much data the query had to examine. |
| Cache Behavior | Whether data came from memory or storage. |
| Resource Impact | CPU, memory, and I/O consumed by the query. |
| Temporary File Use | Whether the query spilled to disk. |
Operational value: Turns every execution into a learning opportunity, revealing why a query behaves as it does.
5. Query Variant Testing
Section titled “5. Query Variant Testing”Beacon supports testing multiple versions of a query to compare performance.
| Capability | Description |
|---|---|
| Side-by-Side Execution | Run alternative formulations and compare outcomes. |
| Performance Comparison | Contrast duration, rows, and resource use across variants. |
| Plan Comparison | See how different formulations produce different plans. |
| Result Equivalence Check | Confirm variants return equivalent results. |
Operational value: Enables evidence-based optimization — testing rather than guessing.
6. Data Exploration
Section titled “6. Data Exploration”The Playground supports ad-hoc data inspection to support diagnosis.
| Capability | Description |
|---|---|
| Result Browsing | Navigate returned data with paging and sorting. |
| Column Inspection | View column types and values clearly. |
| Quick Filtering | Refine results without rewriting the query. |
| Result Export | Export query results for external use. |
Operational value: Supports the investigative work that accompanies performance diagnosis.
7. Query History & Reuse
Section titled “7. Query History & Reuse”Beacon maintains a record of queries executed in the Playground.
| Capability | Description |
|---|---|
| Session History | Queries run during the current session. |
| Persistent History | Earlier queries available across sessions. |
| Search & Filter | Locate past queries by content or time. |
| Re-run & Modify | Reload a past query for further work. |
| Save for Later | Promote a history entry to a saved query. |
Operational value: Preserves investigative work and reduces repetitive query authoring.
8. Safety & Guardrails
Section titled “8. Safety & Guardrails”Beacon includes safeguards to prevent unintended impact.
| Safeguard | Description |
|---|---|
| Statement Classification | Identify read vs. write operations before execution. |
| Confirmation Prompts | Require confirmation for potentially impactful statements. |
| Execution Limits | Configurable timeouts and row limits. |
| Cancellation | Stop long-running queries on demand. |
| Permission Awareness | Playground actions respect the user’s role and access level. |
Operational value: Allows exploratory query work without risking unintended changes to production data.
Playground Views
Section titled “Playground Views”Editor View
Section titled “Editor View”The primary query composition and execution surface.
Results Panel
Section titled “Results Panel”Tabular display of query output with controls for browsing and export.
Plan Panel
Section titled “Plan Panel”Integrated execution plan visualization for the current query.
History Panel
Section titled “History Panel”Browsable record of past queries.
Saved Queries
Section titled “Saved Queries”A library of stored queries for reuse.
Configuration Options
Section titled “Configuration Options”| Option | Purpose |
|---|---|
| Default Instance | Which database the Playground connects to initially. |
| Execution Timeout | Maximum duration before a query is automatically cancelled. |
| Row Limit | Maximum rows returned by default. |
| Auto-Plan Capture | Whether plans are captured automatically on execution. |
| History Retention | How long query history is preserved. |
| Confirmation Threshold | Which statement types require confirmation. |
Operational Scenarios
Section titled “Operational Scenarios”Scenario 1 — Testing an optimization hypothesis A developer suspects a query would benefit from rewriting a subquery as a join. They run both versions in the Playground, compare duration and plans, and confirm the improvement before proposing a change.
Scenario 2 — Investigating a slow query Starting from the Query Performance Analysis module, a user opens a slow query in the Playground to inspect its plan, test variations, and understand why it is slow.
Scenario 3 — Exploring unfamiliar data A user writes a simple query to inspect a table’s contents, refines it interactively, and saves the final version for future use.
Summary
Section titled “Summary”Beacon’s SQL Playground brings query work and query analysis together. By combining an interactive editor, immediate performance feedback, integrated plan visualization, and safe execution guardrails, it turns the platform into a practical environment for both diagnosis and optimization.
