A newer version of this documentation is available.

View Latest

What’s new in Couchbase Server 4.1

Building on the landmark Couchbase Server 4.0 release, Couchbase Server 4.1 delivers significant advances, primarily in query performance and functionality, that will benefit both developers and the enterprise.

Specifically, Couchbase Server 4.1 includes over 300 improvements in scalability and performance, and enables the following new capabilities:

N1QL: Complete SQL CRUD support with N1QL for batch and OLTP applications

Common SQL statements, such as INSERT, UPDATE, DELETE, MERGE and UPSERT are now fully supported in Couchbase Server 4.1. The benefit is that you can now manipulate JSON documents with N1QL and fully support all query requirements of enterprise Web, Mobile, and IoT applications.

For more detail, the N1QL INSERT statement allows both singleton and multi-document inserts. UPDATE and DELETE enable the manipulation of a set of documents based on specific criteria. Both of these statements use available indices to efficiently identify and update documents. The UPSERT and MERGE statements merge two sets of documents based on given criteria. All of these traditional SQL statements have been adapted to support JSON documents.

The SQL statements are fully supported in Couchbase SDKs, REST APIs, and Simba’s JDBC and ODBC drivers.

Low latency queries with covering indexes and prepared statements

Covering indexes

By definition, a Covering Index is an index that contains at minimum all the fields required by a specific query. What this means for your application, is that covering indexes will help a query run faster. With a standard index, a query execution flow will initially scan the index service for data, but would then have to spend additional time to scan the data service to complete the query. By using a Covering Index, only the scan of that Covering Index is required for data access. The result is lower query latency and a faster performing application.

For more detail, N1QL queries use available indices to efficiently execute the query. When a query only needs to reference the key attributes of the chosen index, it can avoid fetching the full document to answer the query. The query will then take fewer resources and run faster. In addition, the N1QL query engine exploits the index ordering to avoid data sorting when the index keys match the key attributes in ORDER BY clause.

Prepared statements

A prepared statement enables execution of the same, or similar, query many times with high efficiency by avoiding repeated query parsing and preparation. Many applications require repeated execution of predefined queries with only different parameters. Performing these repeated queries as ad hoc statements requires query parsing, planning and execution each time. Using a Prepared Statement template, where the execution plan is fixed and only specific variables are substituted each time the query is run, removes the overhead required to parse and compile an execution plan for these often-repeated queries. The result is lower latency and reduced CPU cycles – and a faster performing application.

Additional certified platforms

Couchbase Server 4.1 is now certified to run on both Windows 10 and the Mac OS X 10.11 (El Capitan) platforms in addition to the existing supported platforms.

See What’s new in Couchbase Server 4.0 for a quick look at what was new in the 4.0 release.