22. Type Field name Remark
CPU cpu_utilization
SWAP swap_used
Free memory mem_free
Total memory mem_total
23. Type Field name Remark
disk consumed couch_docs_actual_disk_size the physical memory used in
the node
background fetches ep_bg_fetched data not in the cache and
pulled from disk
24. Type Field name Remark
Operations Per Second ops This is a fundamental measure of
the total number of gets, sets,
increment, and decrements that
occur for a given bucket.
Cache Miss ep_cache_miss_rate The metric counts the ratio of
requested objects found in the
cache in relation to what is needed
to be fetched from disk;
as close to 0 as possible
Fragmentation couch_docs_fragmentation measure should auto-compaction
be set on a scheduled basis
25. Type Field name Remark
Working Set ep_bg_fetched /
vb_active_resident_items_ratio
The resident items ratio and
memory headroom metrics to
understand if your bucket has
enough capacity to store the most
requested objects in memory
Disk Drain ep_queue_size to monitor regardless of what
you’re application is doing is the
drain rate.
From a REST standpoint we can
monitor both the queue fill
(ep_diskqueue_fill) and how quickly
the queue is draining
(ep_diskqueue_drain) to track the
trend over time.
34. API Query Use index
/notebooks findByOwnerOrHaveReadPermission
select count(*) from `dbee` where javaClass =
"com.delta.ssir.dbee.repository.entity.Notebook"
AND LOWER(owner) = "amber.lee"
OR (javaClass = "com.delta.ssir.dbee.repository.entity.Notebook" AND
owner != "amber.lee" AND
ANY per IN permissions SATISFIES per = {"id":"amber.lee", "permission":1,
"role": "1"} END)
CREATE INDEX notebook_owner_permissions
ON `dbee` (owner, ALL permissions)
WHERE javaClass =
"com.delta.ssir.dbee.repository.entity.Notebook"
countBySharedNote
select count(*) from `dbee` where javaClass =
"com.delta.ssir.dbee.repository.entity.Note"
AND shareNote == true
AND owner != "amber.lee"
AND ANY per IN permissions SATISFIES per = {"id":"amber.lee",
"permission":1, "role": "1"} END
CREATE INDEX
note_shareNote_owner_permissions
ON `dbee` (shareNote, owner, ALL permissions)
WHERE javaClass =
"com.delta.ssir.dbee.repository.entity.Note"
37. API Query Use index
/users/info findByName
select * from `dbee` where javaClass =
"com.delta.ssir.dbee.repository.entity.User"
AND name = “rich.lee”
CREATE INDEX user_name
ON `dbee` (name)
WHERE javaClass =
"com.delta.ssir.dbee.repository.entity.User"
countByOwnerAndIsDeletedFalse CREATE INDEX
note_owner_notebookId_isDeleted
ON `dbee` (owner, notebookId, isDeleted)
WHERE javaClass =
"com.delta.ssir.dbee.repository.entity.Note"
countByOwnerIgnoreCase (Notebook) Use notebook_owner_permissions
countByAllNoteSharedWithMe
SELECT COUNT(*) FROM #{#n1ql.bucket} WHERE #{#n1ql.filter} AND
owner != $1
AND ANY per IN permissions SATISFIES per = per = {"id":$1, "permission":$2,
"role": $3} END
Use note_shareNote_owner_permissions
38. API Query Use index
/markers findByMarkerTypeOrderBySeqAndParentIds
select count(*) from `dbee` where javaClass =
"com.delta.ssir.dbee.repository.entity.Marker”
AND markerType = $1 ORDER BY ARRAY_LENGTH(parentIds), seq
CREATE INDEX marker_markerType_owner
ON `dbee` (markerType, owner)
WHERE javaClass =
"com.delta.ssir.dbee.repository.entity.Marker"
findByOwnerAndMarkerTypeOrderBySeqAndParentIds
select count(*) from `dbee` where javaClass =
"com.delta.ssir.dbee.repository.entity.Marker”
AND owner = $1
AND markerType = $2
ORDER BY ARRAY_LENGTH(parentIds), seq
Use marker_markerType_owner
39. API Query Use index
/topics findByOwnerIgnoreCase CREATE INDEX topic_owner
ON `dbee` (owner)
WHERE javaClass =
"com.delta.ssir.dbee.repository.entity.Topic"
40. Array Indexing
Making the most of your Arrays… with N1QL Array Indexing
Indexing JSON in Couchbase
Indexing Best Practices