About SQL++
- reference
Operational Insights extends the grammar, statements, and capabilities of SQL++ for Analytics used with the Analytics Service in Couchbase Server and Capella. This guide is a reference to the full syntax and semantics of the SQL++ query language that you use with Operational Insights.
SQL++ for Operational Insights is a Couchbase implementation, focused on parallel data analysis, of a SQL-for-JSON query language specification called SQL++.
SQL++ for Operational Insights is similar to SQL. The differences between the languages are due to the differences in the data models that each language is designed to serve. SQL interacts with the flat, schematic world of relational databases, while SQL++ for Operational Insights interacts with the nested, schema-less or schema-optional world of NoSQL systems like Operational Insights. SQL++ for Operational Insights is designed to work with the JSON data model.
Grammar-guided explanations, diagrams, and examples of the SQL++ for Operational Insights language follow.
Features
This reference includes descriptions of features that extend SQL++ specifically for use with Operational Insights. These features include:
-
An expanded entity hierarchy: see Entities.
-
New syntax for creating standalone collections: see CREATE a Standalone Collection.
-
New DML statements:
-
A new DDL/DML statement to create a standalone collection and populate it with the results of a query: see CREATE COLLECTION AS.
Statements
SQL++ for Operational Insights statements fall into the following groups:
-
Queries: SELECT Statements.
-
Data definition: DDL Statements.
-
Data manipulation: DML Statements.
-
Access control: RBAC Statements.
-
Query optimization:
-
ANALYZEcollects and drops the samples that the cost-based optimizer uses. See Collecting Samples. -
ADVISEreturns index recommendations for a query. See Index Advisor. -
SEToverrides system parameters for a single request. See Performance Tuning.
-