Skip to content

Commit b658cf7

Browse files
committed
DOC-11228: IA Query Rework — Getting System Information page (#224)
* Move non-monitoring catalogs to the system information page * Move Logical Hierarchy from System Information to Query Concepts * Add Profiling Summary table * Move table of catalogs from Manage and Monitor Queries to System Info * Copy Authentication from Manage and Monitor Queries to System Information * Update intro and reinstate information on how to access the keyspaces * Tidy up Query Concepts * Tidy up Get System Information * Update links to system catalogs * Update links to logical hierarchy * Update N1QL Management overview page * Add table styles to Manage and Monitor Queries
1 parent c99b121 commit b658cf7

38 files changed

+1465
-1382
lines changed

modules/guides/pages/cbo.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ Reference:
225225
Administrator guides:
226226

227227
* xref:clusters:query-service/query-workbench.adoc#query-settings[Modify Query Settings]
228-
* xref:n1ql:n1ql-manage/monitoring-n1ql-query.adoc#sys-dictionary[Monitor Statistics]
228+
* xref:n1ql:n1ql-intro/sysinfo.adoc#sys-dictionary[Monitor Statistics]
229229

230230
Querying with SDKs:
231231

modules/n1ql/pages/n1ql-intro/queriesandresults.adoc

Lines changed: 56 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,62 @@ SELECT name, brewery_id from `beer-sample` WHERE brewery_id IS NOT MISSING LIMIT
7272
}
7373
----
7474

75-
[#keyspace-reference]
76-
== Keyspace References
75+
[#logical-hierarchy]
76+
== Logical Hierarchy
7777

7878
Couchbase stores data within a xref:clusters:data-service/about-buckets-scopes-collections.adoc[logical hierarchy] of buckets, scopes, and collections.
7979
This enables separation between documents of different types.
80+
81+
Datastores::
82+
83+
Datastores are similar to sites.
84+
A datastore is a database deployment, for example, a server cluster, cloud service, or mobile installation.
85+
It is analogous to a relation database instance.
86+
87+
Namespaces::
88+
89+
Namespaces are similar to pools.
90+
A namespace is a unit of authorization, resource allocation, and tenancy.
91+
It is analogous to a relational database or schema.
92+
Currently, only the `default` and `system` namespaces are available.
93+
94+
Buckets::
95+
96+
A bucket is the fundamental space for storing data in Couchbase Capella.
97+
Each bucket contains at least one scope by default, and you can create more scopes as required.
98+
It is analogous to a relational database table space or file group.
99+
100+
Scopes::
101+
102+
A scope is a set of one or more collections.
103+
Each scope contains at least one collection by default, and you can create more collections as required.
104+
It is analogous to a group of relational database tables.
105+
106+
Collections::
107+
108+
A collection is a set of documents that may vary in structure.
109+
It is a unit of authorization and resource allocation.
110+
It is analogous to a relational database table.
111+
112+
Keyspaces::
113+
114+
Keyspaces map to collections in Couchbase Capella.
115+
You must refer to a keyspace using a <<keyspace-reference,keyspace reference>>.
116+
+
117+
The term keyspace is also used to refer to any of the catalogs in the xref:n1ql:n1ql-intro/sysinfo.adoc[system] namespace.
118+
119+
[#keyspace-reference]
120+
== Keyspace References
121+
80122
For most queries, you must provide one or more keyspace references to specify the data sources for the query.
81123

82124
A keyspace reference may be:
83125

84-
* A _full_ keyspace reference: a path comprising the bucket, the scope, and the collection which contains the documents you want.
126+
* A [dfn]#full keyspace reference#: a path comprising the optional namespace, the bucket, the scope, and the collection which contains the documents you want.
127+
For example, `default:{backtick}travel-sample{backtick}.inventory.airline`.
85128

86-
* A _partial_ keyspace reference, comprising the collection name only.
129+
* A [dfn]#partial keyspace reference#, comprising the collection name only.
130+
For example, `airline`.
87131

88132
When a query contains partial keyspace references, you must set the <<query-context,query context>> to specify a bucket and scope before running a query.
89133
Partial keyspace references are resolved using the bucket and scope supplied by the query context.
@@ -94,7 +138,7 @@ In this case, the <<query-context,query context>> must not be set.
94138
[#query-context]
95139
== Query Context
96140

97-
The [def]_query context_ specifies the the namespace, bucket, and scope used to resolve partial keyspace references.
141+
The [dfn]#query context# specifies the the namespace, bucket, and scope used to resolve partial keyspace references.
98142

99143
When the query context is set, you can refer to a collection using just the collection name, without having to enter the keyspace path.
100144
When the query context is not set, it defaults to the `default` namespace, with no bucket, scope, or collection.
@@ -113,10 +157,10 @@ This can be used to support the separation of tenant data in a multi-tenancy env
113157
--
114158

115159
[#paths]
116-
== Paths
160+
== Sub-Document Paths
117161

118162
One of the main differences between JSON and flat rows is that JSON supports a nested structure, allowing documents to contain other documents, also known as sub-documents.
119-
{sqlpp} provides [.term]_paths_ to support nested data.
163+
{sqlpp} provides [dfn]#sub-document paths# to support nested data.
120164
Paths use dot notation syntax to identify the logical location of an attribute within a document.
121165
For example, to get the street from a customer order, use the path `orders.billTo.street`.
122166
This path refers to the value for `street` in the `billTo` object.
@@ -160,13 +204,13 @@ the Query tab.
160204
For more information and examples, refer to xref:n1ql:n1ql-manage/query-settings.adoc#section_srh_tlm_n1b[Named Parameters and Positional Parameters].
161205

162206
[#prepare-stmts]
163-
== Query Optimization Using Prepared Statements
207+
== Prepared Statements
164208

165209
When a {sqlpp} query is sent to the server, the server inspects the query and parses it, planning which indexes to use, if any.
166-
Once this is done, it generates a _query plan_.
210+
Once this is done, it generates a [dfn]#query plan#.
167211
The computation for the plan adds some additional processing time and overhead for the query.
168212

169-
A frequently-used query can be _prepared_ so that its plan is generated only once.
213+
You can [dfn]#prepare# a frequently-used query so that its plan is generated only once.
170214
Subsequent queries using the same query will use the pre-generated plan instead, saving on the overhead and processing of the plan each time.
171215

172216
NOTE: Parameterized queries are considered the same query for caching and planning purposes, even if the supplied parameters are different.
@@ -181,10 +225,10 @@ This allows specific data (for example, specific fields) to be retrieved quickly
181225

182226
The Index service enables you to create two types of index: primary indexes and global secondary indexes.
183227

184-
* You can define a _primary index_ on a keyspace.
228+
* You can define a [dfn]#primary index# on a keyspace.
185229
Primary indexes are based on the unique key of every item in a specified collection. A primary index is intended to be used for simple queries, which have no filters or predicates.
186230

187-
* You can also create a _secondary index_ on specific fields in a keyspace.
231+
* You can also create a [dfn]#secondary index# on specific fields in a keyspace.
188232
Secondary indexes, often referred to as Global Secondary Indexes or GSIs, constitute the principal means of indexing documents to be accessed by the Query service.
189233
+
190234
For example, creating a secondary index on the `name` and `email` fields in the `users` keyspace would allow you to query the keyspace regarding a document's `name` or `email` properties.

0 commit comments

Comments
 (0)