v3.5.2
0%

Query Duration Distribution

Primary Indexes Used

โš ๏ธ WARNING โš ๏ธ
Primary index scans in production can cause full bucket scans leading to severe performance issues

Query Pattern Features

Users by Query Count

Count User

Index Usage Count

Note: #primary count shows total operations, not unique queries
Count Index Name Bucket.Scope.Collection

Statement Type

Query State

Drag box to zoom area
Indexes Used: 0
Queries Executed: 0
Total Indexes: 0
Buckets: 0
Scopes: 0
Collections: 0
Primary Indexes: 0
Used/Total Indexes: 0/0
Without/With Replica: 0/0
Never Scanned Indexes: 0

No Index Data Loaded

To analyze indexes, run this query in your Couchbase Query Workbench and paste the results in the second textarea above:

                          SELECT 
                            s.name,
                            s.id,
                            s.metadata,
                            s.state,
                            s.num_replica,
                            CONCAT("CREATE INDEX ", s.name, " ON ", k, ks, p, w, ";") AS indexString
                            FROM system:indexes AS s
                            LET bid = CONCAT("", s.bucket_id, ""),
                                sid = CONCAT("", s.scope_id, ""),
                                kid = CONCAT("", s.keyspace_id, ""),
                                k = NVL2(bid, CONCAT2(".", bid, sid, kid), kid),
                                ks = CASE WHEN s.is_primary THEN "" ELSE "(" || CONCAT2(",", s.index_key) || ")" END,
                                w = CASE WHEN s.condition IS NOT NULL THEN " WHERE " || REPLACE(s.condition, '"', "'") ELSE "" END,
                                p = CASE WHEN s.`partition` IS NOT NULL THEN " PARTITION BY " || s.`partition` ELSE "" END;
                      

Steps:
1. Copy the query above
2. Run it in Couchbase Query Workbench
3. Copy the JSON results
4. Paste into the second textarea ,on the right, at the top
5. Click "Parse JSON" again