Couchbase system:buckets do not return any information

Hi
I am not able to understand why I am not getting any rows back

image

I also have another question, i came to know that Couchbase moved to cost based index in 7.0, for cost based, you need to know the bucket statistics as well. Where does Couchbase store the document counts? For other databases system tables capture those information and usually we run runstats periodically to capture those metrics for legacy databases. For modern databases like SNOWFLAKE, it is auto collected. I am wondering how Couchbase stores such information

I have got the answer for the 2nd question. The below blog explains it.

Boost Query Efficiency with Cost-Based Optimization in Couchbase

https://docs.couchbase.com/server/current/n1ql/n1ql-intro/sysinfo.html#querying-buckets
Pre 7.0 buckets – SELECT * FROM system:keyspaces;

7.0
buckets only — SELECT * FROM system:buckets;
buckets and collections — SELECT * FROM system:keyspaces;

1 Like