Couchbase Query Analyzer - User Guide

Learn how to extract data, parse JSON, and use the analyzer tabs.

Step-by-step instructions for using the Query Analyzer tool. For concepts and optimization strategies, see the Analysis Hub.

How to Process and Generate Charts/Stats

1) Extract Data

Run this in Query Workbench, Capella Query tab, or cbq, then export as JSON.

SELECT *, meta().plan FROM system:completed_requests ORDER BY requestId LIMIT 2000;

Tip: For larger datasets, prefer targeted filters before exporting.

Advanced Source SQL++ & Filters • Sample JSON

2) Paste or Upload JSON

Open Analyzer — in the upper-left input, paste or upload your JSON and it will auto-parse, or click Parse JSON.

Parse JSON button in the analyzer

Private & secure: Runs and processes your data entirely in your browser and its memory. No server uploads.

3) Parse JSON & Filters Overview

After parsing, use filters to focus analysis:

  • Date/Time Range — From/To with quick presets (Original | 1 Week | 1 Day | 1 Hour)
  • SQL++ Statement Contains — text filter for keywords/patterns

    PRO – a great way to focus only on one query pattern and reduce the noise from other queries

  • Elapsed Time Filter — comparisons and ranges (e.g., >=500ms, 0.5s-2s)
    Elapsed Filter Examples

    Filter by the elapsedTime of each query using comparisons and ranges. Supported: <, <=, =, >, >=, ranges like 100-500ms or 0.5s-2s, unit-inferred ranges like 3-15s, shorthand 500ms+ (means >= 500ms), and bare numbers (e.g., 150 means >= 150ms).

    • Comparators: >500ms, >=1s, <2s, =150ms
    • Ranges (inclusive): 100-500ms, 0.5s-2s, 3-15s (unit applied to both sides)
    • Shorthand: 500ms+ (same as >=500ms)
    • Bare number: 150 is interpreted as >=150ms
  • Timezone Picker — Adjust the charts/graphs x-axis time to display in your chosen timezone. Select from the dropdown to convert all timestamps accordingly.
  • Exclude System Queries — hides system:*, INFER/ADVISE, CREATE/ALTER INDEX, etc.
4) Analyzer Tabs
Dashboard screenshot Dashboard screenshot (full view)
Dashboard
High-level charts and distributions
Insights screenshot Insights screenshot (full view)
Insights
Automated checks and quick wins
Timeline screenshot Timeline screenshot (full view)
Timeline
Time-series performance with zoom
Query Groups screenshot Query Groups screenshot (full view)
Query Groups
Normalized patterns and aggregates
Every Query screenshot Every Query screenshot (full view)
Every Query
Sortable table of executions
Index/Query Flow screenshot Index/Query Flow (full view)
Index/Query Flow
Relationship diagram
Indexes screenshot Indexes screenshot (full view)
Indexes
Inventory and performance of indexes
5) Add Indexes JSON (Optional but Recommended)

Run this separate query for system:indexes and paste/upload to the upper-right input to enrich Indexes and Flow views.

SELECT *, meta() FROM system:indexes;

Sample system:indexes JSON